diff options
| -rw-r--r-- | lua/lspconfig/server_configurations/sumneko_lua.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/lspconfig/server_configurations/sumneko_lua.lua b/lua/lspconfig/server_configurations/sumneko_lua.lua index e0063d9d..792cca93 100644 --- a/lua/lspconfig/server_configurations/sumneko_lua.lua +++ b/lua/lspconfig/server_configurations/sumneko_lua.lua @@ -22,10 +22,14 @@ return { cmd = cmd, filetypes = { 'lua' }, root_dir = function(fname) - local root = util.root_pattern(unpack(root_files))(fname) or util.root_pattern 'lua/'(fname) + local root = util.root_pattern(unpack(root_files))(fname) if root and root ~= vim.env.HOME then return root end + root = util.root_pattern 'lua/'(fname) + if root then + return root .. '/lua/' + end return util.find_git_ancestor(fname) end, single_file_support = true, |
