feat: merge in lspconfig options

This commit is contained in:
Folke Lemaitre 2021-05-20 09:16:11 +02:00
parent 0faabb95ae
commit 1f7ee38d0f
3 changed files with 16 additions and 4 deletions

View File

@ -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
-- add any options here, or leave empty to use the default settings
-- lspconfig = {
-- cmd = {"lua-language-server"}
-- },
})
local lspconfig = require('lspconfig')

View File

@ -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

View File

@ -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