[Lazyvim] Diagnostic output in a floating window
Diagnostics that tattoo errors as virtual text right onto every line are like a debugger shouting across the whole workshop. Here the setting is different: the clutter is off, and everything useful pops up in a floating window once the cursor finally comes to rest. The editor becomes nicer and more comfortable to work with.

Видео «lsp-and-diagnostics» не найдено (урок не готов или slug неверный).
The setting goes in ./config/nvim/lua/config/autocmds.lua:
vim.diagnostic.config({
float = { source = nil, border = "single" },
virtual_text = false,
signs = true,
})
vim.api.nvim_create_autocmd({ "CursorHold"}, {
command = "lua vim.diagnostic.open_float(nil, {focus=false})",
})