if has('nvim') lua << EOF vim.diagnostic.config({ virtual_text = false, signs = true, underline = true, update_in_insert = false, severity_sort = false, }) vim.cmd('autocmd CursorHold * lua vim.diagnostic.open_float()') vim.o.updatetime = 300 -- Show all diagnostics on current line in floating window --vim.api.nvim_set_keymap( -- 'n', 'd', ':lua vim.diagnostic.open_float()', -- { noremap = true, silent = true } --) -- Go to next diagnostic (if there are multiple on the same line, only shows -- one at a time in the floating window) --vim.api.nvim_set_keymap( -- 'n', 'n', ':lua vim.diagnostic.goto_next()', -- { noremap = true, silent = true } --) -- Go to prev diagnostic (if there are multiple on the same line, only shows -- one at a time in the floating window) --vim.api.nvim_set_keymap( -- 'n', 'p', ':lua vim.diagnostic.goto_prev()', -- { noremap = true, silent = true } --) EOF endif