chore(nvim): update lspinstall config

This commit is contained in:
Oliver Davies 2021-09-28 00:07:38 +01:00
parent 896b6fe2b5
commit a77cccf2c9

View file

@ -15,28 +15,29 @@ configs.setup {
} }
-- LSP -- LSP
local function setup_servers()
require'lspinstall'.setup()
local servers = require'lspinstall'.installed_servers()
for _, server in pairs(servers) do
require'lspconfig'[server].setup{}
end
end
local lspconfig = require'lspconfig' setup_servers()
--local completion = require'completion'
--local function custom_on_attach(client) -- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim
--print('Attaching to ' .. client.name) require'lspinstall'.post_install_hook = function ()
--completion.on_attach(client) setup_servers()
--end vim.cmd("bufdo e")
end
--local default_config = { --lspconfig.intelephense.setup{
--on_attach = custom_on_attach, --filetypes = { "install", "inc", "module", "php", "test", "theme" },
--} --}
lspconfig.intelephense.setup{ --lspconfig.tsserver.setup{
filetypes = { "install", "inc", "module", "php", "test", "theme" }, --filetypes = { "js", "jsx", "ts", "vue" },
} --}
lspconfig.tsserver.setup{
filetypes = { "js", "jsx", "vue" },
}
require'lspconfig'.vuels.setup{}
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, { vim.lsp.diagnostic.on_publish_diagnostics, {