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

Recent Neovim

Masafumi Okura
July 30, 2021
110

Recent Neovim

Masafumi Okura

July 30, 2021
Tweet

Transcript

  1. ࠷ۙͷNeovim͸


    ͜Μͳײͬ͡Ά͍Α
    ੺ẂנϥΠτχϯάτʔΫʢAkarenga.LTʣ ୈ10ճ
    OKURA Masafumi, 2021-07-30

    View full-size slide

  2. ࣗݾ঺հ
    • ໊લɿେ૔խ࢙


    • ॴଐɿϑϦʔϥϯε


    • ಘҙͳݴޠɿRuby


    • ࢖͍ͬͯΔΤσΟλɿNeovim


    • ՝֎׆ಈɿKaigi on Rails, ʰϚελϦϯάVimʱ຋༁

    View full-size slide

  3. ࠓ೔ͷςʔϚ

    View full-size slide

  4. Neovimͱ͸
    • https://neovim.io/


    • ݹ͔͘Β͋ΔΤσΟλͰ͋ΔVimͷϑΥʔΫ


    • LuaΛ࠾༻֦ͨ͠ுੑͷߴ͕͞΢Ϧ


    • 2021೥࣌఺Ͱ͸Vimͱҟͳͬͨํ޲ʹਐԽ͍ͯ͠Δ

    View full-size slide

  5. ࠷ۙͷNeovimࣄ৘
    • LSPʢLanguage Server Protocolʣͷ૊ΈࠐΈ


    • TreeSitterͷద༻ʹΑΔ֦ு͞ΕͨγϯλοΫεϋΠϥΠτ


    • Floating WindowʹΑΔUIͷࣗ༝౓ͷߴ͞

    View full-size slide

  6. LSP
    • https://microsoft.github.io/language-server-protocol/


    • Microsoft͕։࢝ͨ͠ΤσΟλͷͨΊͷϓϩτίϧ


    • ิ׬ީิͷఏڙ΍ϦωʔϜػೳͳͲɺ༷ʑͳػೳΛඋ͑Δ


    • NeovimͰ͸ݱ࣌఺Ͱͷ࠷৽൛Ͱ͋Δv0.5ΑΓωΠςΟϒʹαϙʔτ
    ͞ΕΔ

    View full-size slide

  7. TreeSitter
    • https://tree-sitter.github.io/tree-sitter/


    • ύʔαδΣωϨʔλͱύʔεϥΠϒϥϦ


    • ֤छϓϩάϥϛϯάݴޠʹରԠ


    • nvim-treesitterϓϥάΠϯΛ࢖͏͜ͱͰNeovimͷγϯλοΫεϋΠϥ
    ΠτΛஔ͖׵͑Մೳ

    View full-size slide

  8. nvim-treesitter
    • https://github.com/nvim-treesitter/nvim-treesitter


    • ࠓݟͨΒNeovim v0.5Ͱ͸ಈ͔ͳ͍ͱॻ͍͚ͯ͋ͬͨͲɺ࢖ͬͯΈͨ
    ײ͡ಈ͍ͯͦ͏


    • NeovimͷγϯλοΫεϋΠϥΠτ͕ΊͪΌ៉ྷʹͳΔ

    View full-size slide

  9. Floating Window

    View full-size slide

  10. Floating Window
    • Neovimͷ௨ৗͷόοϑΝͷ্ʹΦʔόʔϨΠ͢Δ΢Οϯυ΢


    • API͔Β࡞੒Ͱ͖Δ


    • Gitͷ৘ใ΍Linterͷ৘ใΛग़͢ϓϥάΠϯ͕͋Δ

    View full-size slide

  11. ͓·͚ɿVimͱϚ΢εΦʔόʔ

    View full-size slide

  12. VimͱϚ΢εΦʔόʔ
    • ࠷ۙͷVimʹ͸ʮόϧʔϯʯͱݺ͹ΕΔFloating Window૬౰ͷػೳ
    ͕͋Γɺ͔͠΋Ϛ΢εΦʔόʔʹରԠ͍ͯ͠Δ


    • Linterͷܯࠂ͕ग़͍ͯΔՕॴʹϚ΢εΛ͍࣋ͬͯ͘ͱܯࠂͷৄࡉ͕ද
    ࣔ͞ΕΔ


    • Neovimʹ͸ͳ͍ػೳ

    View full-size slide