summaryrefslogtreecommitdiff
path: root/lua/lvim/lsp/providers/sumneko_lua.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lvim/lsp/providers/sumneko_lua.lua')
-rw-r--r--lua/lvim/lsp/providers/sumneko_lua.lua34
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