Skip to content

Commit

Permalink
fix: use existing library on settings.Lua.workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jul 12, 2021
1 parent 5e6caa9 commit cf3b028
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/lua-dev/sumneko.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ end

function M.setup()
local path = M.path()
local library = M.library()
return {
on_new_config = function(config, root_dir)
local lib = vim.tbl_deep_extend("force", {}, library)
local lib = vim.tbl_deep_extend("force", {}, config.settings.Lua.workspace.library)
lib[vim.loop.fs_realpath(root_dir) .. "/lua"] = nil
lib[vim.loop.fs_realpath(root_dir)] = nil
config.settings.Lua.workspace.library = lib
Expand All @@ -93,7 +92,7 @@ function M.setup()
-- hint = { enable = true },
workspace = {
-- Make the server aware of Neovim runtime files
library = library,
library = M.library(),
maxPreload = 1000,
preloadFileSize = 150,
},
Expand Down

0 comments on commit cf3b028

Please sign in to comment.