lsp.lua (1468B) - View raw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57return { { "williamboman/mason.nvim", lazy = false, config = function() require("mason").setup() end, }, { "williamboman/mason-lspconfig.nvim", lazy = false, opts = { auto_install = true, ensure_installed = { "helm_ls", "dockerls" }, }, }, { "neovim/nvim-lspconfig", lazy = false, config = function() local capabilities = require('cmp_nvim_lsp').default_capabilities() vim.lsp.enable({ "lua_ls", "clangd", "rust_analyzer", "bashls", "html", "cssls", "jsonls", "helm_ls", "yamlls", "dockerfile-language-server", "tinymist", "gopls", "pylsp" }) vim.lsp.config("*", { capabilities = capabilities }) vim.diagnostic.config({ virtual_text = { prefix = '', spacing = 4, }, signs = { text = { [vim.diagnostic.severity.ERROR] = '', [vim.diagnostic.severity.WARN] = '', }, }, underline = true, update_in_insert = true, severity_sort = true, }) vim.keymap.set('n', '<leader>lf', vim.lsp.buf.format) -- vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) -- vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {}) -- vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {}) -- vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {}) end, }, }