return { 'neovim/nvim-lspconfig', name = 'lsp', ft = 'java', dependencies = { 'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim' }, opts = { -- options for vim.diagnostic.config() diagnostics = { underline = true, update_in_insert = false, signs = false, virtual_text = { 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 = { focusable = false, -- style = 'minimal', border = 'rounded', source = 'always', header = '', prefix = '', }, severity_sort = true, }, }, config = function(_, opts) vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) -- vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { -- border = 'rounded', -- }) -- vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, { -- border = 'rounded', -- }) local on_references = vim.lsp.handlers['textDocument/references'] vim.lsp.handlers['textDocument/references'] = vim.lsp.with(on_references, { -- Use location list instead of quickfix list loclist = true, }) end }