diff options
Diffstat (limited to 'nvim/.config')
-rw-r--r-- | nvim/.config/nvim/lua/lsp_config.lua | 28 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins.lua | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/nvim/.config/nvim/lua/lsp_config.lua b/nvim/.config/nvim/lua/lsp_config.lua index d5fcf14..792811a 100644 --- a/nvim/.config/nvim/lua/lsp_config.lua +++ b/nvim/.config/nvim/lua/lsp_config.lua @@ -64,6 +64,34 @@ for _, lsp in pairs(servers) do }) end +-- rust +require("rust-tools").setup({ + tools = { + runnables = { + use_telescope = true, + }, + inlay_hints = { + auto = true, + show_parameter_hints = false, + parameter_hints_prefix = "", + other_hints_prefix = "", + }, + }, + + -- options to send to nvim-lspconfig + server = { + on_attach = on_attach, + capabilities = capabilities, + settings = { + ["rust-analyzer"] = { + checkOnSave = { + command = "clippy", + }, + }, + }, + }, +}) + -- overrides for typescript lspconfig.tsserver.setup({ on_attach = function(client, bufnr) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index a60c9de..7c4e4d4 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -74,6 +74,7 @@ require('packer').startup(function() 'jose-elias-alvarez/null-ls.nvim', 'jose-elias-alvarez/nvim-lsp-ts-utils', 'hrsh7th/cmp-nvim-lsp', + 'simrat39/rust-tools.nvim', }, config = function() require('lsp_config') end, } |