Set root_dir for efm-langserver configurations (#899)

This commit is contained in:
Pasi Bergman 2021-07-13 00:03:20 +03:00 committed by GitHub
parent abdf383aa9
commit ab103baf51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 0 deletions

View file

@ -25,6 +25,7 @@ if not require("lv-utils").check_lsp_client_active "efm" then
-- init_options = {initializationOptions}, -- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
init_options = { documentFormatting = true, codeAction = false }, init_options = { documentFormatting = true, codeAction = false },
root_dir = require("lspconfig").util.root_pattern(".git/", "requirements.txt"),
filetypes = { "python" }, filetypes = { "python" },
settings = { settings = {
rootMarkers = { ".git/", "requirements.txt" }, rootMarkers = { ".git/", "requirements.txt" },

View file

@ -26,6 +26,7 @@ if not require("lv-utils").check_lsp_client_active "efm" then
-- init_options = {initializationOptions}, -- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
init_options = { documentFormatting = true, codeAction = false }, init_options = { documentFormatting = true, codeAction = false },
root_dir = require("lspconfig").util.root_pattern(".git/"),
filetypes = { "sh" }, filetypes = { "sh" },
settings = { settings = {
rootMarkers = { ".git/" }, rootMarkers = { ".git/" },

View file

@ -24,6 +24,7 @@ if not require("lv-utils").check_lsp_client_active "efm" then
-- init_options = {initializationOptions}, -- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
init_options = { documentFormatting = true, codeAction = false }, init_options = { documentFormatting = true, codeAction = false },
root_dir = require("lspconfig").util.root_pattern(".git/"),
filetypes = { "zsh" }, filetypes = { "zsh" },
settings = { settings = {
rootMarkers = { ".git/" }, rootMarkers = { ".git/" },

View file

@ -21,6 +21,7 @@ M.setup = function()
-- init_options = {initializationOptions}, -- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
init_options = { documentFormatting = true, codeAction = false }, init_options = { documentFormatting = true, codeAction = false },
root_dir = require("lspconfig").util.root_pattern(".git/", "package.json"),
filetypes = { filetypes = {
"vue", "vue",
"javascript", "javascript",