added more capabilities to my nvim setup

This commit is contained in:
2026-01-19 18:45:00 -07:00
parent aa84c4997e
commit a9b956e141
18 changed files with 312 additions and 44 deletions

40
lua/plugins/lsp-roots.lua Normal file
View File

@@ -0,0 +1,40 @@
return {
{
"neovim/nvim-lspconfig",
opts = {
servers = {
tsserver = {
root_dir = function(fname)
return require("lspconfig.util").root_pattern(
"pnpm-workspace.yaml",
"nx.json",
"turbo.json",
"package.json",
".git"
)(fname)
end,
},
gopls = {
root_dir = function(fname)
return require("lspconfig.util").root_pattern(
"go.work",
"go.mod",
".git"
)(fname)
end,
},
pyright = {
root_dir = function(fname)
return require("lspconfig.util").root_pattern(
"pyproject.toml",
"setup.py",
".git"
)(fname)
end,
},
},
},
},
}