各言語ごとの LanguageServer の自動起動などを担うのが lspconfig。
https://github.com/neovim/nvim-lspconfig
packer による install
lua
packer.startup(function()
use {
"neovim/nvim-lspconfig",
config = function()
vim.api.nvim_set_var("lsp_signs_enabled", 1)
vim.api.nvim_set_var("lsp_diagnostics_enabled", 1)
vim.api.nvim_set_var("lsp_diagnostics_echo_cursor", 1)
vim.api.nvim_set_var("lsp_virtual_text_enabled", 1)
-- vim.api.nvim_set_var("lsp_signs_error", { text = "✗" })
-- vim.api.nvim_set_var("lsp_signs_warning", { text = "‼" })
-- vim.api.nvim_set_var("lsp_signs_information", { text = "i" })
-- vim.api.nvim_set_var("lsp_signs_hint", { text = "?" })
end,
}
end)
vim.cmd "PackerInstall"
言語毎の LanguageServer
python
$ npm i -g pyright
nvim-lsp
- [x] Lua: LanguageServer(sumneko_lua)
- [x] Python: LanguageServer(pylsp)
- [x] Python: LanguageServer(pyright)
- [x] Python: DebugAdatper(debugpy)
- [x] C++: LanguageServer(clangd)
- [x] C++: DebugAdapter(codelldb)
- [x] Rust: LanguageServer(rust_analyzer)
- [x] C#: LanguageServer(OmniSharp)
- [x] C#: DebugAdapter(netcoredbg)
- [ ] Unity: DebugAdapter(unitydebug)