return { { "neovim/nvim-lspconfig", init = function() local keys = require("lazyvim.plugins.lsp.keymaps").get() keys[#keys + 1] = { "gd", "Glance definitions", desc = "Goto definition" } keys[#keys + 1] = { "gr", "Glance references", desc = "References" } keys[#keys + 1] = { "gy", "Glance type_definitions", desc = "Goto t[y]pe definitions" } keys[#keys + 1] = { "gI", "Glance implementations", desc = "Goto implementations" } keys[#keys + 1] = { "ca", require("actions-preview").code_actions, desc = "Code Action Preview" } end, opts = { -- options for vim.diagnostic.config() diagnostics = { underline = true, update_in_insert = false, virtual_text = { spacing = 4, source = "if_many", prefix = "●", -- this will set set the prefix to a function that returns the diagnostics icon based on the severity -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported -- prefix = "icons", float = { border = { { "┌", "FloatBorder" }, { "─", "FloatBorder" }, { "┐", "FloatBorder" }, { "│", "FloatBorder" }, { "┘", "FloatBorder" }, { "─", "FloatBorder" }, { "└", "FloatBorder" }, { "│", "FloatBorder" }, }, }, }, severity_sort = true, }, -- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0 -- Be aware that you also will need to properly configure your LSP server to -- provide the inlay hints. inlay_hints = { enabled = false, }, -- add any global capabilities here capabilities = {}, -- Enable this to show formatters used in a notification -- Useful for debugging formatter issues format_notify = false, -- options for vim.lsp.buf.format -- `bufnr` and `filter` is handled by the LazyVim formatter, -- but can be also overridden when specified format = { formatting_options = nil, timeout_ms = nil, }, -- LSP Server Settings ---@type lspconfig.options servers = { jsonls = {}, lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason -- Use this to add any additional keymaps -- for specific lsp servers ---@type LazyKeys[] -- keys = {}, settings = { Lua = { workspace = { checkThirdParty = false, }, completion = { callSnippet = "Replace", }, }, }, }, }, -- you can do any additional lsp server setup here -- return true if you don't want this server to be setup with lspconfig ---@type table setup = { -- example to setup with typescript.nvim -- tsserver = function(_, opts) -- require("typescript").setup({ server = opts }) -- return true -- end, -- Specify * to use this function as a fallback for any server -- ["*"] = function(server, opts) end, }, }, }, }