From dd3bfc74fa31b2606cc8f71f91665bf040a4a5a8 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