From 9caf296d52500dc4723bb50071dca835d5563374 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 26 Feb 2022 12:53:04 +0100 Subject: [PATCH] home: vim: show diagnostics on hover Ideally, I want the following features: * diagnostic icons in the sign column always, * virtual text on the current line only * switch to hover window and/or lsp_lines display through a mapping --- home/vim/plugin/settings/diagnostics.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/vim/plugin/settings/diagnostics.vim b/home/vim/plugin/settings/diagnostics.vim index 8327866..db68098 100644 --- a/home/vim/plugin/settings/diagnostics.vim +++ b/home/vim/plugin/settings/diagnostics.vim @@ -15,3 +15,9 @@ vim.diagnostic.config({ severity_sort = true, }) EOF + +augroup DiagnosticsHover + autocmd! + " Show diagnostics on "hover" + autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false, scope="cursor"}) +augroup END