diff options
author | kylo252 <[email protected]> | 2022-09-12 18:41:25 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-09-12 18:41:25 +0200 |
commit | 7535f4eff9ca70dfe73db4a099d509590aa07ade (patch) | |
tree | a7b660de5ec874271f1174f7834eb7576eb8d12f /lua/lvim/lsp | |
parent | 2519e07423e2f6ce4cbed6483305dcaa5bbabf4e (diff) |
fix(plugins): handle deprecated options (#3014)
Diffstat (limited to 'lua/lvim/lsp')
-rw-r--r-- | lua/lvim/lsp/providers/sumneko_lua.lua | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lua/lvim/lsp/providers/sumneko_lua.lua b/lua/lvim/lsp/providers/sumneko_lua.lua index fa0d2d31..6cd78157 100644 --- a/lua/lvim/lsp/providers/sumneko_lua.lua +++ b/lua/lvim/lsp/providers/sumneko_lua.lua @@ -1,3 +1,19 @@ +local dev_opts = { + library = { + vimruntime = true, -- runtime path + types = true, -- full signature, docs and completion of vim.api, vim.treesitter, vim.lsp and others + -- plugins = true, -- installed opt or start plugins in packpath + -- you can also specify the list of plugins to make available as a workspace library + plugins = { "plenary.nvim" }, + }, + override = nil, -- function(root_dir, options) end, +} + +local lua_dev_loaded, lua_dev = pcall(require, "lua-dev") +if lua_dev_loaded then + lua_dev.setup(dev_opts) +end + local opts = { settings = { Lua = { @@ -15,20 +31,4 @@ local opts = { }, } -local lua_dev_loaded, lua_dev = pcall(require, "lua-dev") -if not lua_dev_loaded then - return opts -end - -local dev_opts = { - library = { - vimruntime = true, -- runtime path - types = true, -- full signature, docs and completion of vim.api, vim.treesitter, vim.lsp and others - -- plugins = true, -- installed opt or start plugins in packpath - -- you can also specify the list of plugins to make available as a workspace library - plugins = { "plenary.nvim" }, - }, - lspconfig = opts, -} - -return lua_dev.setup(dev_opts) +return opts |