neovim 0.5.0 + LSP + lua-based plugins
wookayin opened this issue · 4 comments
Neovim 0.5.0 is out. It is time to migrate from coc to LSP.nvim and treesitter.
Resources (Guide and config example):
https://github.com/rockerBOO/awesome-neovim
https://news.ycombinator.com/item?id=27713358
https://www.reddit.com/r/neovim/comments/ol6fqq/050_language_server_client_qa_w_mjlbach_me/
https://blog.inkdrop.info/how-to-set-up-neovim-0-5-modern-plugins-lsp-treesitter-etc-542c3d9c9887
https://alpha2phi.medium.com/neovim-lsp-enhanced-a3d313abee65
https://nathansmith.io/posts/neovim-lsp/
https://elianiva.my.id/post/my-nvim-lsp-setup
https://github.com/siduck76/NvChad
https://cj.rs/blog/my-setup/nvim-0-5/
https://github.com/ttys3/nvim-config
https://www.reddit.com/r/neovim/comments/opipij/guide_tips_and_tricks_to_reduce_startup_and/
https://github.com/FotiadisM/nvim-lua-setup
https://github.com/akinsho/dotfiles <- A great neovim config
https://github.com/Neelfrost/dotfiles <- this one too
https://github.com/mattleong/CosmicNvim
https://github.com/lvim-tech/lvim <- Nice config for DAP, LSP
LSP Plugins
-
✅ Basic LSP config: https://github.com/neovim/nvim-lspconfig
-
LSP servers/plugin management:
https://github.com/kabouzeid/nvim-lspinstall- ✅ https://github.com/williamboman/nvim-lsp-installer (this is much better); automatically install LSP plugins on startup.
-
✅ https://github.com/folke/lua-dev.nvim: To make lua LSP aware of neovim
-
Completion engine
https://github.com/nvim-lua/completion-nvim(in favor of nvim-compe)- ✅
https://github.com/hrsh7th/nvim-compe(deprecated) - ✅ https://github.com/hrsh7th/nvim-cmp (bd9682f)
- ✅ https://github.com/ray-x/lsp_signature.nvim: Show function signature upon completion
- ✅ https://github.com/onsails/lspkind-nvim: Add symbol pictograms
-
Other useful utilities:
- ✅ https://github.com/folke/trouble.nvim: Show LSP diagnostic like quickfix
- https://github.com/nvim-lua/glepnir/lspsaga.nvim
- ✅ https://github.com/nvim-lua/lsp-status.nvim: Show statusline
- https://github.com/RishabhRD/nvim-lsputils
- https://github.com/ray-x/navigator.lua (Code Navigation and other LSP batteries)
- https://github.com/SmiteshP/nvim-gps
-
Treesitter (advanced syntax support)
- https://github.com/nvim-treesitter/nvim-treesitter
- Note: Treesitter's syntax highlight overrides existing python syntax. It should also replace semshi (since most use cases are covered). It also breaks some other plugins that rely on highlight groups (e.g. vim-autoimport) because
synID
cannot retrieve dynamic highlights. - https://github.com/romgrk/nvim-treesitter-context (replaces context.nvim)
- https://github.com/nvim-treesitter/nvim-treesitter-refactor
- Debugging: https://github.com/nvim-treesitter/playground
-
Autoformatting (actually has nothing to do with LSP; should support buffer and range reformatting)
DAP (Debug Adapter Protocol)
Out of scope, will be done later
- https://microsoft.github.io/debug-adapter-protocol/overview
- A tutorial: https://alpha2phi.medium.com/neovim-dap-enhanced-ebc730ff498b
- Plugins:
- https://github.com/mfussenegger/nvim-dap
- https://github.com/rcarriga/nvim-dap-ui
- https://github.com/theHamsta/nvim-dap-virtual-text
- https://github.com/Pocco81/DAPInstall.nvim
- https://github.com/mfussenegger/nvim-dap-python (for Python)
- https://github.com/jbyuki/one-small-step-for-vimkind (for Lua)
- https://github.com/rcarriga/vim-ultest
Other Utilities (needed because replacing coc.nvim, etc.)
- ✅ Lua-based file tree explorer (like coc-explorer): https://github.com/kyazdani42/nvim-tree.lua
- ✅ Display color (like coc-color): https://github.com/norcalli/nvim-colorizer.lua
- Generic linters for miscellaneous filetypes without LSP configuration (ALE)
- Ultisnip's automatic pylint snippet needs to be adjusted as well
- ✅ Telescope (new): https://github.com/nvim-telescope/telescope.nvim
Missing features / TODO
- ✅ Peek definition (previously
gP
,<leader>K
) - ✅ Automatic (and manual) code formatting
- Automatic import organization upon save (but should be able to opt out if needed)
- Auto pair parentheses
#28 adds first minimal LSP configuration; nvim-lsp-installer, nvim-compe, lsp_signature.nvim, trouble.nvim, nvim-tree.lua, etc.
The next milestone will include treesitter (still experimental) and more advanced IDE-like features such as peek definition, auto formatting, etc.
Basic LSP support are all done and have been quite stable. Treesitter, DAP integration will be left as future work.