return { { "neovim/nvim-lspconfig", enabled = true, lazy = false, dependencies = { "williamboman/mason-lspconfig.nvim" }, config = function(_, _) -- Install and configure servers require("mason").setup() require("mason-lspconfig").setup({ ensure_installed = { "arduino_language_server", "basedpyright", "bashls", "clangd", "cssls", "denols", "gopls", "html", "jsonls", "kotlin_language_server", "lemminx", "lua_ls", "marksman", "ruff_lsp", "rust_analyzer", "sqlls", "taplo", "terraformls", "tsserver", "yamlls" } }) -- Configuration on attach vim.api.nvim_create_autocmd("LspAttach", { group = vim.api.nvim_create_augroup("UserLspConfig", {}), callback = function(_) vim.keymap.set("n", "SR", vim.lsp.buf.rename) vim.keymap.set("n", "Sx", vim.lsp.buf.code_action) vim.keymap.set("n", "SI", function() vim.lsp.inlay_hint.enable( not vim.lsp.inlay_hint.is_enabled()) end) vim.keymap.set("n", "", vim.lsp.buf.hover) end }) end }, { "williamboman/mason-lspconfig.nvim", enabled = true, lazy = false, automatic_installation = true, dependencies = { "williamboman/mason.nvim" } }, { "williamboman/mason.nvim", enabled = true, lazy = false, build = ":MasonUpdate" } }