fix(neovim): taplo (toml LSP) configured & Rust LSP improvements

- `taplo` LSP config added so Cargo.toml files gets LSP benefits
- Rust LSP: buildScripts, ignored directories
- Crates: completion & LSP plug
This commit is contained in:
Pratik Tripathy
2025-07-30 22:27:11 +05:30
parent e469144856
commit d8914b9d2e
2 changed files with 23 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ vim.lsp.enable({
"marksman", "marksman",
"markdownlint", "markdownlint",
"trivy", "trivy",
"taplo",
}) })
-- TIP: On new systems, install these through Mason -- TIP: On new systems, install these through Mason

View File

@@ -78,7 +78,12 @@ return {
-- LSP configuration -- LSP configuration
default_settings = { default_settings = {
["rust-analyzer"] = { ["rust-analyzer"] = {
cargo = { allFeatures = true }, cargo = {
allFeatures = true,
loadOutDirsFromCheck = true,
buildScripts = { enabled = true },
},
checkOnSave = true,
diagnostics = { diagnostics = {
enable = true, enable = true,
enableExperimental = true, enableExperimental = true,
@@ -114,6 +119,9 @@ return {
["async-recursion"] = { "async_recursion" }, ["async-recursion"] = { "async_recursion" },
}, },
}, },
files = {
excludeDirs = { ".direnv", ".git", ".github", ".gitlab", "bin", "node_modules", "target", "venv", ".venv" },
},
}, },
}, },
dap = { dap = {
@@ -129,6 +137,19 @@ return {
{ {
"saecki/crates.nvim", "saecki/crates.nvim",
tag = "stable", tag = "stable",
opts = {
completion = {
crates = {
enabled = true,
},
},
lsp = {
enabled = true,
actions = true,
completion = true,
hover = true,
},
},
config = function() config = function()
require("crates").setup() require("crates").setup()
end, end,