You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

52 lines
1.1 KiB

local M = {}
local servers = {
gopls = {},
html = {},
jsonls = {},
pyright = {},
tsserver = {},
vimls = {},
dartls = {},
dockerls = {},
intelephense = {},
sqlls = {},
volar = {},
}
local function on_attach(client, bufnr)
-- Enable completion triggered by <C-X><C-O>
-- See `:help omnifunc` and `:help ins-completion` for more information.
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
-- Use LSP as the handler for formatexpr.
-- See `:help formatexpr` for more information.
vim.api.nvim_buf_set_option(0, "formatexpr", "v:lua.vim.lsp.formatexpr()")
-- Configure key mappings
require("lsp.keymaps").setup(client, bufnr)
end
local lsp_signature = require "lsp_signature"
lsp_signature.setup {
bind = true,
handler_opts = {
border = "rounded",
},
}
local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
local opts = {
on_attach = on_attach,
capabilities = cababilities,
flags = {
debounce_text_changes = 150,
},
}
function M.setup()
require("lsp.installer").setup(servers, opts)
end
return M