diff options
Diffstat (limited to 'lua/lspconfig/manager.lua')
| -rw-r--r-- | lua/lspconfig/manager.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/lspconfig/manager.lua b/lua/lspconfig/manager.lua index 9b2c7d02..26fdc7de 100644 --- a/lua/lspconfig/manager.lua +++ b/lua/lspconfig/manager.lua @@ -270,12 +270,14 @@ function M:try_add(bufnr, project_root) async.run(function() local root_dir - if get_root_dir then + if type(get_root_dir) == 'function' then root_dir = get_root_dir(buf_path, bufnr) async.reenter() if not api.nvim_buf_is_valid(bufnr) then return end + elseif type(get_root_dir) == 'string' then + root_dir = get_root_dir end if root_dir then |
