mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
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:
@@ -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
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user