diff options
Diffstat (limited to 'lua/lspconfig/configs/regols.lua')
| -rw-r--r-- | lua/lspconfig/configs/regols.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/lspconfig/configs/regols.lua b/lua/lspconfig/configs/regols.lua index 63c6a3f0..f5854fb6 100644 --- a/lua/lspconfig/configs/regols.lua +++ b/lua/lspconfig/configs/regols.lua @@ -5,7 +5,8 @@ return { cmd = { 'regols' }, filetypes = { 'rego' }, root_dir = function(fname) - return util.root_pattern '*.rego'(fname) or util.find_git_ancestor(fname) + return util.root_pattern '*.rego'(fname) + or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1]) end, single_file_support = true, }, |
