Forráskód Böngészése

Set root_dir for efm-langserver configurations (#899)

Pasi Bergman 4 éve
szülő
commit
ab103baf51
4 módosított fájl, 4 hozzáadás és 0 törlés
  1. 1 0
      ftplugin/python.lua
  2. 1 0
      ftplugin/sh.lua
  3. 1 0
      ftplugin/zsh.lua
  4. 1 0
      lua/lsp/ts-fmt-lint.lua

+ 1 - 0
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" },

+ 1 - 0
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/" },

+ 1 - 0
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/" },

+ 1 - 0
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",