summaryrefslogtreecommitdiff
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.lua35
1 files changed, 28 insertions, 7 deletions
diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua
index 4e9ef07..5080622 100644
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -12,13 +12,13 @@ return {
},
{
- "williamboman/mason-lspconfig.nvim",
- config = function()
- require("mason-lspconfig").setup {
- ensure_installed = { "bashls", "lua_ls", "clangd", "marksman", "pyright", "rust_analyzer" },
- automatic_installation = true,
- }
- end
+ "williamboman/mason-lspconfig.nvim",
+ config = function()
+ require("mason-lspconfig").setup {
+ ensure_installed = { "bashls", "lua_ls", "clangd", "marksman", "pyright", "rust_analyzer" },
+ automatic_installation = true,
+ }
+ end
},
{
@@ -44,6 +44,27 @@ return {
})
lspconfig.rust_analyzer.setup({
capabilities = capabilities,
+ settings = {
+ ['rust-analyzer'] = {
+ assist = {
+ importEnforceGranularity = true,
+ importPrefix = 'crate',
+ },
+ cargo = {
+ allFeatures = true,
+ },
+ checkOnSave = {
+ command = 'clippy',
+ },
+ inlayHints = { locationLinks = false },
+ diagnostics = {
+ enable = true,
+ experimental = {
+ enable = true,
+ },
+ },
+ },
+ },
})
-- Key mapping