aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/lsp.lua')
-rw-r--r--.config/nvim/lua/plugins/lsp.lua41
1 files changed, 41 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua
index 855818f..ca91c2f 100644
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -14,6 +14,13 @@ require("mason-lspconfig").setup({
"lua_ls",
"pylsp",
"pyright",
+ "jedi_language_server",
+ "rust_analyzer",
+ "bashls",
+ --"bash-language-server",
+ "vimls"
+ --"vim-language-server",
+
},
ui = {
icons = {
@@ -33,6 +40,7 @@ require("mason-lspconfig").setup({
},
},
max_concurrent_installers = 10,
+ automatic_installation = true,
})
-- Use an on_attach function to only map the following keys after the language server attaches to the current buffer
@@ -296,6 +304,39 @@ require("lspconfig").rust_analyzer.setup{
}
end
+local opts = {
+ tools = {
+ runnables = {
+ use_telescope = true,
+ },
+ inlay_hints = {
+ auto = true,
+ show_parameter_hints = false,
+ parameter_hints_prefix = "",
+ other_hints_prefix = "",
+ },
+ },
+
+ -- all the opts to send to nvim-lspconfig
+ -- these override the defaults set by rust-tools.nvim
+ -- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer
+ server = {
+ -- on_attach is a callback called when the language server attachs to the buffer
+ on_attach = on_attach,
+ settings = {
+ -- to enable rust-analyzer settings visit:
+ -- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc
+ ["rust-analyzer"] = {
+ -- enable clippy on save
+ checkOnSave = {
+ command = "clippy",
+ },
+ },
+ },
+ },
+}
+require('rust-tools').setup(opts)
+
vim.diagnostic.config({
underline = false,
signs = true,