Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go Language Server 使うべし
Search
Toshikazu Ohashi
January 31, 2019
Programming
5
1.9k
Go Language Server 使うべし
Go(Un)Conference(Goあんこ)LT大会 5kg
Toshikazu Ohashi
January 31, 2019
Tweet
Share
More Decks by Toshikazu Ohashi
See All by Toshikazu Ohashi
黒画面が最高のしごと道具である3つの理由
lighttiger2505
0
200
Golangで作るSQL Language Server(sqls)
lighttiger2505
1
680
Connect with many developers from the small plugin
lighttiger2505
0
290
作ってわかる現代のVimのAutoComplete ~そしてVimConf2019へ~
lighttiger2505
3
1.5k
自社サービスのDjangoを 1.3から1.11(LTS)に アップグレードするまでの道のり
lighttiger2505
6
3.3k
LSPがもたらしたVimプラグインの変化に思いを馳せる
lighttiger2505
2
1.3k
ターミナルアプリケーションとしてのVim
lighttiger2505
0
470
Goで作るインタラクティブなCLIコマンドとそのデザイン
lighttiger2505
0
720
GUI is not fast enough!! (GUIには速さが足りないっ!!)
lighttiger2505
0
500
Other Decks in Programming
See All in Programming
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
Outline View in SwiftUI
1024jp
1
340
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
360
イベント駆動で成長して委員会
happymana
1
340
RubyLSPのマルチバイト文字対応
notfounds
0
120
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
cmp.Or に感動した
otakakot
3
220
CSC509 Lecture 12
javiergs
PRO
0
160
Jakarta EE meets AI
ivargrimstad
0
260
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Site-Speed That Sticks
csswizardry
0
33
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
For a Future-Friendly Web
brad_frost
175
9.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Embracing the Ebb and Flow
colly
84
4.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Transcript
(P -BOHVBHF 4FSWFS ͏͠ (P 6O $POGFSFODFʢ(P͋Μ͜ʣ-5େձLH !MJHIUUJHFS
-BOHVBHF4FSWFS 1SPUPDPM ͳʹʁͳͥ
-BOHVBHF4FSWFS ݴޠ։ൃπʔϧΛ౷߹ͨ͠αʔό w ࣗಈิ w ఆٛδϟϯϓ w ࢀরݕࡧFUD -BOHVBHF4FSWFS1SPUPDPM -41
-BOHVBHF4FSWFSͱΫϥΠΞϯτؒͰ༻͢Δϓϩτίϧ w .JDSPTPGU͕༷ࡦఆ 74$PEFͷͨΊʁ w +40/31$ϕʔε -BOHVBHF4FSWFSͱͳʹ͔
͜Ε·ͰΤσΟλຖʹݴޠπʔϧΛར༻͢ΔϓϥάΠϯ͕ඞཁͩͬͨ w 74$PEFͷ1ZUIPOϓϥάΠϯ w "UPNͷ1ZUIPOϓϥάΠϯ w 7JNͷ1ZUIPOϓϥάΠϯ w 4VCMJNF5FYU &NBDT
4PVSDFHSBQIFUD ݴޠίϛϡχςΟͷ։ൃϦιʔεΛ-BOHVBHF 4FSWFSʹूதͯ͠ߴ࣭ͳݴޠ։ൃπʔϧΛ࡞Δ Ϣʔβ-41ΛαϙʔτΫϥΠΞϯτΛಋೖͯ͠ ͙͢ʹߴ࣭ͳݴޠͷαϙʔτΛڗडͰ͖Δ ͋ͱͰৄ͘͠͠·͢ -BOHVBHF4FSWFSͳͥඞཁ͔
(Pͷ-BOHVBHF4FSWFS
ݱঢ়ɺൃల͕ظ͞Ε͍ͯΔ(Pͷ-BOHVBHF4FSWFSҎԼͷͭ HPQMT w (Pެࣜͷ-BOVHBHF4FSWFS CJOHP w TPVSDFHSBQIHPMBOHTFSWFSΠϯεύΠϠͷ αʔυύʔςΟ-BOHVBHF4FSWFS
.FUIPE ػೳ (P5PPMT textDocument/completion ࣗಈิ gocode* textDocument/definition ఆٛδϟϯϓ godef* textDocument/formatting
ϑΥʔϚοτ gofmt textDocument/hover ώϯτදࣔ gogetdoc* textDocument/implementation ܧঝؔ impl textDocument/rename ໊લมߋ gorename* textDocument/references γϯϘϧࢀরݕࡧ guru textDocument/documentSymbol υΩϡϝϯτγϯϘϧݕࡧ guru workspace/symbol ϫʔΫεϖʔεγϯϘϧݕࡧ guru -41ͱ(Pݴޠ։ൃπʔϧ * αʔυύʔςΟπʔϧ
.FUIPE HPQMT CJOHP textDocument/completion ◦ ◦ textDocument/definition ◦ ◦ textDocument/formatting
◦ ◦ textDocument/hover ◦ ◦ textDocument/implementation - ◦ textDocument/rename - ◦ textDocument/references - ◦ textDocument/documentSymbol - ◦ workspace/symbol - ◦ HPQMTͱCJOHPͷൺֱ 2019/01/28࣌Ͱ֤ServerͷCapabilitiesΛऔಘͨ݁͠Ռ
ͳ͍ͥ· -BOHVBHF4FSWFSͳͷ͔
ಡΜͰ͍ͩ͘͞ (P"EWFOU$BMFOEBS ʰHPDPEFΊ·͢ ͦͯ͠-BOHVBHF4FSWFS ʱ IUUQTNBUUOLBPSJZBOFUTPGUXBSFMBOHHPIUN
ͬͯΘ͔ͬͨ -BOHVBHF4FSWFSͷԸܙ
͔͜͜Β ͘Β͍7JNͷ 8BSOJOH
-BOHVBHF4FSWFSಋೖ #FGPSF"GUFS
#FGPSF"GUFS
KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM JNQM
HVSV HPMJOU 7JN ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN 1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP
KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM JNQM
HVSV HPMJOU ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN 1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP 7JN ΤσΟλ
KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM JNQM
HVSV HPMJOU 7JN ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN 1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP ΤσΟλϓϥάΠϯ
7JN ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN
1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM HVSV HPMJOU ݴޠ։ൃπʔϧ
#FGPSF"GUFS
ࣗಈิ (deoplete) LSPิ (deoplete- vim-lsp) QZMT HPQMTCJOHP Language Server Client
(vim-lsp) 7JN -41
ࣗಈิ (deoplete) LSPิ (deoplete- vim-lsp) QZMT HPQMTCJOHP 7JN Language Server
Client (vim-lsp) -41 -BOHVBHF4FSWFS$MJFOU
ࣗಈิ (deoplete) LSPิ (deoplete- vim-lsp) 7JN Language Server Client (vim-lsp)
QZMT HPQMTCJOHP -41 -BOHVBHF4FSWFS
ͲΜͳਓʹͲΜͳԸܙ͕ ͋Δ͔ ໝ
-41ίϛϡχςΟͷ։ൃϦιʔεΛΑΓޮతʹ ӡ༻͢ΔͨΊͷϑϨʔϜϫʔΫ ͍ΖΜͳཱͷਓʹԸܙ͕͋Δ w ΤσΟλϓϥάΠϯ։ൃऀ w ݴޠπʔϧ։ൃऀ w ΤσΟλϢʔβ
ΤσΟλϓϥάΠϯ։ൃऀ
#FGPSF"GUFS
KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM JNQM
HVSV HPMJOU ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN 1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP 7JN ຊདྷΓ͍ͨ͜ͱ ड͚औͬͨ݁ՌΛͲ͏දࣔ͢ΕΑΓ Ϣʔβ͕ศརʹͳΔ͔
KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM JNQM
HVSV HPMJOU ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN 1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP ํ͕ͳ͘Δ͜ͱ ݴޠ։ൃπʔϧ͝ͱʹ࣮͕ඞཁ w ݺͼग़͠ํ๏ Φϓγϣϯͷҧ͍ w ݁Ռͷύʔε ग़ྗϑΥʔϚοτҧ͍ πʔϧ͕ҧ͍͑ํҧ͏
#FGPSF"GUFS
ࣗಈิ (deoplete) LSPิ (deoplete- vim-lsp) QZMT HPQMTCJOHP 7JN Language Server
Client (vim-lsp) -41 ͪ͜ΒʹूதͰ͖Δ มΘͬͨ͜ͱ -41Ͱ༷͕౷Ұ͞Ε͍ͯΔ͔Β -BOHVBHF4FSWFSΛม͑ͯݸผରԠඞཁφγ
Ϧιʔεͷूத (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN Language Server Client (vim-lsp) 7JNTDSJQU
(P 7JNTDSJQU 1ZUIPO
(PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN Language Server Client (vim-lsp) 7JNTDSJQU0OMZ Ϧιʔεͷूத
ݴޠπʔϧ։ൃऀ
#FGPSF"GUFS
7JN ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN
1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM JNQM HVSV HPMJOU ຊདྷΓ͍ͨ͜ͱ ਖ਼֬ͰߴͳϨεϙϯεͨΊʹ ΧϦΧϦͷνϡʔχϯά
7JN ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN
1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM JNQM HVSV HPMJOU ํ͕ͳ͘Δ͜ͱ ΤσΟλຖͷݸผରԠ w ΤσΟλ͕ड͚औΓՄೳͳग़ྗ w ड͚औΓқ͍ܗࣜͷύʔε
#FGPSF"GUFS
ࣗಈิ (deoplete) LSPิ (deoplete- vim-lsp) 7JN Language Server Client (vim-lsp)
QZMT HPQMTCJOHP -41 ΤσΟλຖͷࠩΛؾʹ͢Δඞཁͳ͍ ͦͯ͠-41ʹੑೳʹد༩͢Δ ϢʔςΟϦςΟతͳ.FUIPEଘࡏ͠ɺ ੑೳ্ʹΑΓྗΛׂ͚Δ มΘͬͨ͜ͱ
ΤσΟλϢʔβ
#FGPSF"GUFS
7JN ຊདྷΓ͍ͨ͜ͱ ίʔυΛॻ͘͜ͱ WJNSDؚ·ͳ͍ $PEF
KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM JNQM
HVSV HPMJOU ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN 1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP ํ͕ͳ͘Δ͜ͱ ָ͍͠ ݴޠϓϥάΠϯຖͷઃఆ w දࣔಈ࡞Φϓγϣϯ w ίϚϯυͷΩʔόΠϯυ
7JN ϦϯλʔϑΥʔϚολ ϓϥάΠϯ "-& ࣗಈิ EFPQMFUF (PݴޠπʔϧϓϥάΠϯ WJNHP 1ZUIPOݴޠπʔϧϓϥάΠϯ KFEJWJN
1ZUIPOิ EFPQMFUFKFEJ (Pิ EFPQMFUFHP KFEJ HPDPEF BVUPQFQ qBLF JTPSU ZBSQ CMBDL HPEFG JNQM JNQM HVSV HPMJOU ํ͕ͳ͘Δ͜ͱ ָ͍͠ ݸผͷίϚϯυͷΠϯετʔϧ w Ϧϯλʔ w ϑΥʔϚολʔ w ࣗಈิ w ͦͷଞ੩తղੳ
#FGPSF"GUFS
ࣗಈิ (deoplete) LSPิ (deoplete- vim-lsp) QZMT HPQMTCJOHP 7JN Language Server
Client (vim-lsp) -41 มΘͬͨ͜ͱ ͲͷݴޠͰ-BOHVBHF4FSWFS$MJFOUͰର ԠͰ͖Δ w ΠϯετʔϧηοτΞοϓͷলྗԽ w ݴޠຖͷݸผઃఆͷ౷Ұ
ࣗಈิ (deoplete) LSPิ (deoplete- vim-lsp) 7JN Language Server Client (vim-lsp)
QZMT HPQMTCJOHP -41 มΘͬͨ͜ͱ ݴޠ։ൃπʔϧͷ౷߹ w ΠϯετʔϧηοτΞοϓͷলྗԽ ݴޠίϛϡχςΟ։ൃϦιʔεूதʹΑΔ ੑೳ্ w ߴ࣭ͳݴޠ։ൃػೳͷڗड
7JN ॻ͚Δʜίʔυ͕ॻ͚Δͧ $PEF มΘͬͨ͜ͱ
એ
ࣗಈิ (deoplete) LSPิ (deoplete- vim-lsp) QZMT HPQMTCJOHP Language Server Client
(vim-lsp) 7JN -41
ࣗಈิ (deoplete) QZMT HPQMTCJOHP Language Server Client (vim-lsp) 7JN -41
LSPิ (deoplete- vim-lsp)
None
·ͱΊ
(P -BOHVBHF 4FSWFS ͏͠