From f0ecb973480f674cc1e0f46b97714fc7b97c9a01 Mon Sep 17 00:00:00 2001 From: Dmitry O Date: Sun, 31 Mar 2024 22:24:46 +0200 Subject: [PATCH] show source in diagnostic errors --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f6140411..1f7a934b 100644 --- a/init.lua +++ b/init.lua @@ -168,7 +168,9 @@ end, { desc = 'Go to previous [D]iagnostic message' }) vim.keymap.set('n', ']d', function() vim.diagnostic.goto_next { float = { source = true } } end, { desc = 'Go to next [D]iagnostic message' }) -vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' }) +vim.keymap.set('n', 'e', function() + vim.diagnostic.open_float { source = true } +end, { desc = 'Show diagnostic [E]rror messages' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier