|
@ -166,15 +166,11 @@ end |
|
|
|
|
|
|
|
|
-- Show line diagnostics on hover |
|
|
-- Show line diagnostics on hover |
|
|
if not config.doom.enable_lsp_virtual_text then |
|
|
if not config.doom.enable_lsp_virtual_text then |
|
|
local show_diagnostics_function = "vim.diagnostic.open_float(nil, { focus = false })" |
|
|
local show_diagnostics_function = "" |
|
|
if utils.nvim_is_05 then |
|
|
|
|
|
show_diagnostics_function = |
|
|
|
|
|
'vim.lsp.diagnostic.show_line_diagnostics({ focusable = false, border = "single" })' |
|
|
|
|
|
end |
|
|
|
|
|
table.insert(autocmds["doom_extras"], { |
|
|
table.insert(autocmds["doom_extras"], { |
|
|
"CursorHold,CursorHoldI", |
|
|
"CursorHold,CursorHoldI", |
|
|
"<buffer>", |
|
|
"<buffer>", |
|
|
string.format("lua %s", show_diagnostics_function), |
|
|
"lua vim.diagnostic.open_float(nil, { focus = false })", |
|
|
}) |
|
|
}) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|