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