neovim: use .git as root_dir
This commit is contained in:
@@ -87,16 +87,13 @@ for _, server in ipairs(servers) do
|
||||
local opts = {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
root_dir = util.root_pattern(".git"),
|
||||
}
|
||||
|
||||
if server.name == "emmet_ls" then
|
||||
opts.filetypes = { "html", "css", "scss", "javascripreact", "typescriptreact" }
|
||||
end
|
||||
|
||||
if server.name == "tailwindcss" then
|
||||
opts.root_dir = util.root_pattern("tailwind.config.js", "tailwind.config.cjs", "tailwind.config.mjs")
|
||||
end
|
||||
|
||||
if server.name == "sumneko_lua" then
|
||||
local luadev = require("lua-dev").setup({
|
||||
lspconfig = {
|
||||
@@ -144,7 +141,6 @@ for _, server in ipairs(servers) do
|
||||
end
|
||||
|
||||
if server.name == "tsserver" then
|
||||
opts.root_dir = util.root_pattern(".git", "package.json", "tsconfig.json")
|
||||
opts.settings = {
|
||||
tsserver = {
|
||||
experimental = {
|
||||
@@ -164,10 +160,6 @@ for _, server in ipairs(servers) do
|
||||
}
|
||||
end
|
||||
|
||||
if server.name == "eslint" then
|
||||
opts.root_dir = util.root_pattern(".eslintrc", ".eslintrc.json")
|
||||
end
|
||||
|
||||
if server.name == "denols" then
|
||||
opts.root_dir = util.root_pattern("deno.json", "deps.ts")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user