diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-05-06 00:30:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-06 00:30:45 -0700 |
| commit | e6d61cfb8ea54a29b62b878dac08dd70f9f4bf42 (patch) | |
| tree | 0748b12141588da940ecc74a7611c850ef5c931a /lua | |
| parent | Merge pull request #875 from zupatisc/master (diff) | |
| parent | efm: Include current file dir in root detection (diff) | |
| download | nvim-lspconfig-e6d61cfb8ea54a29b62b878dac08dd70f9f4bf42.tar nvim-lspconfig-e6d61cfb8ea54a29b62b878dac08dd70f9f4bf42.tar.gz nvim-lspconfig-e6d61cfb8ea54a29b62b878dac08dd70f9f4bf42.tar.bz2 nvim-lspconfig-e6d61cfb8ea54a29b62b878dac08dd70f9f4bf42.tar.lz nvim-lspconfig-e6d61cfb8ea54a29b62b878dac08dd70f9f4bf42.tar.xz nvim-lspconfig-e6d61cfb8ea54a29b62b878dac08dd70f9f4bf42.tar.zst nvim-lspconfig-e6d61cfb8ea54a29b62b878dac08dd70f9f4bf42.zip | |
Merge pull request #884 from WhyNotHugo/patch-2
efm: Include current file dir in root detection
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/efm.lua | 6 |
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)]]; }; }; } |
