aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/efm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/efm.lua')
-rw-r--r--lua/lspconfig/efm.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/lspconfig/efm.lua b/lua/lspconfig/efm.lua
index d4fc88ac..97ce744f 100644
--- a/lua/lspconfig/efm.lua
+++ b/lua/lspconfig/efm.lua
@@ -8,7 +8,9 @@ local bin_name = "efm-langserver"
configs[server_name] = {
default_config = {
cmd = {bin_name};
- root_dir = util.root_pattern(".git");
+ root_dir = function(fname)
+ return util.root_pattern(".git")(fname) or util.path.dirname(fname)
+ end;
};
docs = {
@@ -18,7 +20,7 @@ https://github.com/mattn/efm-langserver
General purpose Language Server that can use specified error message format generated from specified command.
]];
default_config = {
- root_dir = [[root_pattern(".git")]];
+ root_dir = [[util.root_pattern(".git")(fname) or util.path.dirname(fname)]];
};
};
}