diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-04-02 23:56:17 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-04-02 23:56:17 +0200 |
| commit | a7a3a5c557fbbd4f7a365843c73a4eec5c29fada (patch) | |
| tree | 2c4d8374317d01cda420c9487bd101885e2f0101 /.config/nvim/lua/plugins/lsp.lua | |
| parent | 2527be3fc9980c2cc2bb6a847a1dd5c02c92702e (diff) | |
| parent | a5bd4983f244eade6ff30ede94245406d1fab62c (diff) | |
| download | dotfiles-a7a3a5c557fbbd4f7a365843c73a4eec5c29fada.tar.gz dotfiles-a7a3a5c557fbbd4f7a365843c73a4eec5c29fada.zip | |
Merge commit '03f87c4ea01c77a302096e2db62383d12aeec31b'
Diffstat (limited to '.config/nvim/lua/plugins/lsp.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/lsp.lua | 41 |
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, |
