diff --git a/common/.config/nvim/lua/core/lsp.lua b/common/.config/nvim/lua/core/lsp.lua index 9e7055a..9017214 100644 --- a/common/.config/nvim/lua/core/lsp.lua +++ b/common/.config/nvim/lua/core/lsp.lua @@ -20,6 +20,7 @@ vim.lsp.enable({ "marksman", "markdownlint", "trivy", + "taplo", }) -- TIP: On new systems, install these through Mason diff --git a/common/.config/nvim/lua/plugins/code-lsp.lua b/common/.config/nvim/lua/plugins/code-lsp.lua index e20b798..3ef68f9 100644 --- a/common/.config/nvim/lua/plugins/code-lsp.lua +++ b/common/.config/nvim/lua/plugins/code-lsp.lua @@ -78,7 +78,12 @@ return { -- LSP configuration default_settings = { ["rust-analyzer"] = { - cargo = { allFeatures = true }, + cargo = { + allFeatures = true, + loadOutDirsFromCheck = true, + buildScripts = { enabled = true }, + }, + checkOnSave = true, diagnostics = { enable = true, enableExperimental = true, @@ -114,6 +119,9 @@ return { ["async-recursion"] = { "async_recursion" }, }, }, + files = { + excludeDirs = { ".direnv", ".git", ".github", ".gitlab", "bin", "node_modules", "target", "venv", ".venv" }, + }, }, }, dap = { @@ -129,6 +137,19 @@ return { { "saecki/crates.nvim", tag = "stable", + opts = { + completion = { + crates = { + enabled = true, + }, + }, + lsp = { + enabled = true, + actions = true, + completion = true, + hover = true, + }, + }, config = function() require("crates").setup() end,