47 lines
1.2 KiB
Lua
47 lines
1.2 KiB
Lua
return {
|
|
"neovim/nvim-lspconfig",
|
|
dependencies = {
|
|
"williamboman/mason.nvim",
|
|
"williamboman/mason-lspconfig.nvim",
|
|
},
|
|
config = function()
|
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
local handlers = {
|
|
-- ["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" }),
|
|
-- ["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" }),
|
|
}
|
|
|
|
require("mason").setup()
|
|
require("mason-lspconfig").setup({
|
|
ensure_installed = {
|
|
"lua_ls",
|
|
"gopls",
|
|
"html",
|
|
"basedpyright",
|
|
"clangd",
|
|
"yamlls",
|
|
"ansiblels",
|
|
},
|
|
handlers = {
|
|
function(server_name)
|
|
require("lspconfig")[server_name].setup {
|
|
capabilities = capabilities,
|
|
handlers = handlers
|
|
}
|
|
end,
|
|
clangd = function()
|
|
local lspconfig = require("lspconfig")
|
|
lspconfig.clangd.setup({
|
|
capabilities = capabilities,
|
|
handlers = handlers,
|
|
init_options = {
|
|
fallbackFlags = { '--std=c++20' }
|
|
},
|
|
})
|
|
end,
|
|
}
|
|
})
|
|
|
|
end,
|
|
}
|