diff options
-rw-r--r-- | ftplugin/python.lua | 1 | ||||
-rw-r--r-- | ftplugin/sh.lua | 1 | ||||
-rw-r--r-- | ftplugin/zsh.lua | 1 | ||||
-rw-r--r-- | lua/lsp/ts-fmt-lint.lua | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/ftplugin/python.lua b/ftplugin/python.lua index bfb17a3b..d6b98116 100644 --- a/ftplugin/python.lua +++ b/ftplugin/python.lua @@ -25,6 +25,7 @@ if not require("lv-utils").check_lsp_client_active "efm" then -- init_options = {initializationOptions}, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, init_options = { documentFormatting = true, codeAction = false }, + root_dir = require("lspconfig").util.root_pattern(".git/", "requirements.txt"), filetypes = { "python" }, settings = { rootMarkers = { ".git/", "requirements.txt" }, diff --git a/ftplugin/sh.lua b/ftplugin/sh.lua index c299f2de..2c96dfd1 100644 --- a/ftplugin/sh.lua +++ b/ftplugin/sh.lua @@ -26,6 +26,7 @@ if not require("lv-utils").check_lsp_client_active "efm" then -- init_options = {initializationOptions}, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, init_options = { documentFormatting = true, codeAction = false }, + root_dir = require("lspconfig").util.root_pattern(".git/"), filetypes = { "sh" }, settings = { rootMarkers = { ".git/" }, diff --git a/ftplugin/zsh.lua b/ftplugin/zsh.lua index 49cd103d..6960608b 100644 --- a/ftplugin/zsh.lua +++ b/ftplugin/zsh.lua @@ -24,6 +24,7 @@ if not require("lv-utils").check_lsp_client_active "efm" then -- init_options = {initializationOptions}, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, init_options = { documentFormatting = true, codeAction = false }, + root_dir = require("lspconfig").util.root_pattern(".git/"), filetypes = { "zsh" }, settings = { rootMarkers = { ".git/" }, diff --git a/lua/lsp/ts-fmt-lint.lua b/lua/lsp/ts-fmt-lint.lua index f6b37136..a73b817e 100644 --- a/lua/lsp/ts-fmt-lint.lua +++ b/lua/lsp/ts-fmt-lint.lua @@ -21,6 +21,7 @@ M.setup = function() -- init_options = {initializationOptions}, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, init_options = { documentFormatting = true, codeAction = false }, + root_dir = require("lspconfig").util.root_pattern(".git/", "package.json"), filetypes = { "vue", "javascript", |