vim.diagnostic.config({ virtual_text = false, signs = true, underline = true, update_in_insert = true, severity_sort = false, }) -- hover for diagnostic vim.opt.updatetime = 250 vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(bor, {focus=false, border='rounded'})]] vim.lsp.config('*', { handlers = { ['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { border = 'rounded', }), }, }) local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview ---@diagnostic disable-next-line: duplicate-set-field function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...) opts = opts or {} opts.border = "rounded" return orig_util_open_floating_preview(contents, syntax, opts, ...) end