From f9d2f77b13fbaa35c18c37a221333cbb9d71d49a Mon Sep 17 00:00:00 2001 From: Akulij Date: Mon, 28 Apr 2025 11:50:19 +0300 Subject: [PATCH] show diagnostics on hover --- lua/plugins/lsp.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index f759b02..7249259 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -123,6 +123,10 @@ cmp.setup { } vim.keymap.set('n', "gd", vim.lsp.buf.definition, { silent = true }) +-- Show line diagnostics automatically in hover window +vim.o.updatetime = 250 +vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] + end