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
2k
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
無自覚にメンバーの心理的安全性を奪っていた経験から得た学び
lighttiger2505
138
180k
黒画面が最高のしごと道具である3つの理由
lighttiger2505
0
1.9k
Golangで作るSQL Language Server(sqls)
lighttiger2505
1
830
Connect with many developers from the small plugin
lighttiger2505
0
340
作ってわかる現代のVimのAutoComplete ~そしてVimConf2019へ~
lighttiger2505
3
1.6k
自社サービスのDjangoを 1.3から1.11(LTS)に アップグレードするまでの道のり
lighttiger2505
6
3.4k
LSPがもたらしたVimプラグインの変化に思いを馳せる
lighttiger2505
2
1.3k
ターミナルアプリケーションとしてのVim
lighttiger2505
0
520
Goで作るインタラクティブなCLIコマンドとそのデザイン
lighttiger2505
0
770
Other Decks in Programming
See All in Programming
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
230
暇に任せてProxmoxコンソール 作ってみました
karugamo
1
690
Jakarta EE meets AI
ivargrimstad
0
1.3k
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
100
iOS18とヘルスケアの睡眠対応
takuyaosawa
0
110
PipeCDの歩き方
kuro_kurorrr
4
150
N.E.X.T LEVEL
pluu
2
290
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
280
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
110
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
190
物流システムにおけるリファクタリングとアーキテクチャの再構築 〜依存関係とモジュール分割の重要性〜
deeprain
1
1.2k
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
310
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Statistics for Hackers
jakevdp
796
220k
For a Future-Friendly Web
brad_frost
175
9.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
KATA
mclloyd
29
14k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
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 ͏͠