fix automated handling of libraries with sumneko_lua + lua-dev (#235)

- This also fixes auto completion with native vim api using lua-dev and
  nvim-cmp (also complements #229)

Co-authored-by: spike <spike@w530>
pull/240/head
sp4ke 2 years ago committed by GitHub
parent c583e1a69d
commit 4353d64fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,7 +28,9 @@ local sumneko_cfg = {
},
},
on_new_config = function(cfg, root)
local libs = vim.tbl_deep_extend('force', {}, library)
local libs = vim.schedule(function()
vim.tbl_deep_extend('force', {}, library)
end)
libs[root] = nil
cfg.settings.Lua.workspace.library = libs
return cfg

Loading…
Cancel
Save