| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- 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", "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", "<Space>", 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"
- }
- }
|