Upgrade to Pro — share decks privately, control downloads, hide ads and more …

coc.nvimを使ってみたらとっても良かった話

809b4da865e5bfd77e8192404b4a3786?s=47 Takumi Kawase
September 26, 2019

 coc.nvimを使ってみたらとっても良かった話

809b4da865e5bfd77e8192404b4a3786?s=128

Takumi Kawase

September 26, 2019
Tweet

Transcript

  1. coc.nvimΛ࢖ͬͯΈͨΒ ͱͬͯ΋ྑ͔ͬͨ࿩ Takumi Kawase gorilla.vim#8

  2. w ઒੉ɹ୓࣮ M2෺ੑཧ࿦ʢ਺஋ܭࢉʣ 20ଔΤϯδχΞ • TypeScript(React, Vue) • Go(backend) •

    Python(Deep Learning) • C++(Competitive Programming) @coil_msp123 vimྺ͸ແବʹ5,6೥͘Β͍ ݱࡏ͸neovim೿
  3. Background neovim 0.4΁Ξοϓσʔτ ิ׬͕ޮ͔ͳ͘ͳͬͨ ͕ɺfloating window͸ࢼ͍ͨ͠ʜ ͚Ͳʂิ׬ػೳ͕࢖͑ͳ͍ͷ͸ࠔΔ υοτΛଧͬͯ΋Կ΋දࣔ͞Εͳ͍ʂʢ࠶ݱਤʣ ˞ࠓ͸ಈͬ͘Ά͍Ͱ͢

  4. 1VSQPTF ͔ͤͬ͘ͷػձͩ͠ଞͷϓϥάΠϯΛࢼͯ͠ΈΔ ͦ͏͍͑͹coc.nvimͬͯͷ͕ྑ͍Β͍͠ ˢͱΓ͋͑ͣग़͓ͯ͘͠ͱઆಘྗ͕͋Δؾ͕͢ΔϠπ

  5. Result w ಛʹྑ͔ͬͨ఺ w ʢ૬ରతʹʣಋೖָ͕ w ֦ுػೳͷαϙʔτ w ઃఆ͕KTPOͰهड़Մೳ w

    ։ൃݴޠ͕TypeScript w ѱ͍఺ʁ w ػೳ͕ଟͯ͘೺Ѳ͕େม
  6. ิ׬༻ϑϨʔϜϫʔΫ -41ΫϥΠΞϯτ deoplete.nvim LanguageClient-Neovim asyncomplete.nvim asyncomplete-lsp.vim vim-lsp coc.nvim coc.nvim͸ͦΕ୯ମͰLSPΛ࢖ͬͨิ׬͕ՄೳʹͳΔɻ

  7. coc.nvimͰ͸ಠࣗͷ֦ுػೳ͕ΠϯετʔϧՄೳ • coc-python • coc-json • coc-tsserver • coc-rust-analyzer •

    coc-vetur • etc… LSP΍linterͳͲͷػೳ coc-͔Β࢝·Δ͜ΕΒͷ֦ுػೳΛ :CocInstallίϚϯυͰΠϯετʔϧՄೳ IUUQTXXXOQNKTDPNTFBSDI RLFZXPSET"DPDOWJN ˣ֦ுػೳҰཡ͸ͪ͜Β
  8. •vetur →coc-vetur •python-vscode →coc-python •rls-vscode →coc-rls •etc… vs codeͷࢿݯΛvimͰར༻Ͱ͖Δʂ ֦ுػೳͷҰ෦͸vs

    codeͷ֦ுػೳΛforkͨ͠΋ͷ
  9. None
  10. ઃఆϑΝΠϧcoc-settings.json w coc.nvimͷઃఆ w lspͷઃఆ w ֦ுػೳͷઃఆ ˡcoc-json͕͋Δͱશͯิ׬ :CocConfigίϚϯυͰ։͘

  11. 4VNNBSZ DPDOWJN͸͍͍ͧ

  12. Appendix ༷ʑͳιʔεΛҰཡͰදࣔͯ͠ ͍͋·͍ݕࡧͰߜΓࠐΊΔίϚϯυ :CocList :CocList symbols :CocList sources ͳͲ௚઀ιʔεΛࢦఆ͢Δ͜ͱ΋Մೳ

  13. ߋʹ֦ுػೳͷcoc-listsΛΠϯετʔϧ͢Δ͜ͱͰ ϑΝΠϧ΍όοϑΝͳͲ΋ιʔεʹͰ͖Δʂ

  14. ิ׬͚ͩ͡Όͳ͍LSP ྫ͑͹ ctagsΛ࢖͑͹ఆٛ΁ͷδϟϯϓ͸Ͱ͖Δʜ ͚ͲҰൃͰਖ਼͍͠ఆٛʹඈ΂Δͱ͸ݶΒͳ͍ ͦΕʹࢀর΁ͷδϟϯϓ΋͍ͨ͠ˠgtags

  15. LSPͰ͸ ఆٛ΁ͷҠಈ΍ࢀর΁ͷҠಈ͕αϙʔτ ˢcoc.nvimͷ৔߹ ެࣜͷઃఆ ͜Ε͸΋͸΍WTDPEFͰ͸ʜʁ

  16. IUUQTRJJUBDPNDPJM@NTQJUFNTEFCEEBGB  Qiitaʹهࣄॻ͍͓͖ͯ·ͨ͠