lazyload lua-dev #72

neovim_0.6
ray-x 3 years ago
parent 4e69764a52
commit 1ba70b81d5

@ -7,8 +7,10 @@ return {
if packer_plugins ~= nil then -- packer install
local lazy_plugins = {
["nvim-lspconfig"] = "neovim/nvim-lspconfig",
["guihua.lua"] = "ray-x/guihua.lua"
["guihua.lua"] = "ray-x/guihua.lua",
["lua-dev.nvim"] = "folke/lua-dev.nvim"
}
if _NgConfigValues.lspinstall == true then
lazy_plugins["nvim-lspinstall"] = "kabouzeid/nvim-lspinstall"
end
@ -36,7 +38,7 @@ return {
local lsp_inst_cfg = configs[server]
if lsp_inst_cfg and lsp_inst_cfg.document_config.default_config then
lsp_inst_cfg = lsp_inst_cfg.document_config.default_config
vim.tbl_deep_extend('keep', lsp_inst_cfg, cfg)
lsp_inst_cfg = vim.tbl_deep_extend('keep', lsp_inst_cfg, cfg)
require'lspconfig'[server].setup(lsp_inst_cfg)
end
end

@ -31,6 +31,24 @@ local on_attach = require("navigator.lspclient.attach").on_attach
-- lua setup
local library = {}
local luadevcfg = {
library = {
vimruntime = true, -- runtime path
types = true, -- full signature, docs and completion of vim.api, vim.treesitter, vim.lsp and others
plugins = {"nvim-treesitter", "plenary.nvim"}
},
lspconfig = {
-- cmd = {sumneko_binary},
on_attach = on_attach
}
}
local luadev = {}
local ok, l = pcall(require, "lua-dev")
if ok and l then
luadev = l.setup(luadevcfg)
end
local path = vim.split(package.path, ";")
table.insert(path, "lua/?.lua")
@ -239,6 +257,8 @@ local setups = {
}
}
setups.sumneko_lua = vim.tbl_deep_extend('force', luadev, setups.sumneko_lua)
local servers = {
"angularls", "gopls", "tsserver", "flow", "bashls", "dockerls", "julials", "pylsp", "pyright",
"jedi_language_server", "jdtls", "sumneko_lua", "vimls", "html", "jsonls", "solargraph", "cssls",

Loading…
Cancel
Save