feat: merge in lspconfig options
This commit is contained in:
parent
0faabb95ae
commit
1f7ee38d0f
|
@ -50,6 +50,10 @@ Plug 'folke/lua-dev.nvim'
|
|||
-- you can also specify the list of plugins to make available as a workspace library
|
||||
-- plugins = { "nvim-treesitter", "plenary.nvim", "telescope.nvim" },
|
||||
},
|
||||
-- pass any additional options that will be merged in the final lsp config
|
||||
lspconfig = {
|
||||
-- cmd = {"lua-language-server"}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -57,9 +61,11 @@ Plug 'folke/lua-dev.nvim'
|
|||
|
||||
|
||||
```lua
|
||||
|
||||
local luadev = require("lua-dev").setup({
|
||||
-- add any options here, or leave empty to use the default settings
|
||||
-- lspconfig = {
|
||||
-- cmd = {"lua-language-server"}
|
||||
-- },
|
||||
})
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
|
|
@ -9,6 +9,10 @@ M.defaults = {
|
|||
-- you can also specify the list of plugins to make available as a workspace library
|
||||
-- plugins = { "nvim-treesitter", "plenary.nvim", "telescope.nvim" },
|
||||
},
|
||||
-- pass any additional options that will be merged in the final lsp config
|
||||
lspconfig = {
|
||||
-- cmd = {"lua-language-server"}
|
||||
},
|
||||
}
|
||||
|
||||
--- @type LuaApiOptions
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
local M = {}
|
||||
|
||||
function M.setup(opts)
|
||||
require("lua-dev.config").setup(opts)
|
||||
return require("lua-dev.sumneko").setup()
|
||||
local config = require("lua-dev.config")
|
||||
config.setup(opts)
|
||||
local ret = require("lua-dev.sumneko").setup()
|
||||
return vim.tbl_deep_extend("force", {}, ret, config.options.lspconfig or {})
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Reference in New Issue