mirror of https://github.com/folke/neoconf.nvim
parent
255693b005
commit
f9dcd17b95
|
|
@ -53,12 +53,13 @@ function M.on_config(opts)
|
|||
if opts.root_dir then
|
||||
local root_dir = initial_config.root_dir
|
||||
initial_config.root_dir = function(...)
|
||||
local b = root_dir(...)
|
||||
if not b then
|
||||
return
|
||||
end
|
||||
local a = opts.root_dir(...)
|
||||
|
||||
local b = root_dir and root_dir(...)
|
||||
if not b then
|
||||
return a
|
||||
end
|
||||
|
||||
if a and b then
|
||||
-- return longest
|
||||
return #a > #b and a or b
|
||||
|
|
|
|||
Loading…
Reference in New Issue