neovim: add shortcut to show error info
arnaucube git@arnaucube.com
Wed, 09 Sep 2026 09:35:02 +0200
1 files changed,
6 insertions(+),
0 deletions(-)
jump to
M
init.vim
→
init.vim
@@ -121,6 +121,12 @@ vim.lsp.config('gopls', { capabilities = capabilities })
vim.lsp.config('rust_analyzer', { capabilities = capabilities }) vim.lsp.enable({ 'gopls', 'rust_analyzer' }) +-- Show diagnostic messages beside affected lines, with full details on demand. +vim.diagnostic.config({ virtual_text = true }) +vim.keymap.set('n', '<leader>e', function() + vim.diagnostic.open_float({ scope = 'line' }) +end, { desc = 'Show line diagnostics' }) + vim.keymap.set('n', '<F6>', vim.lsp.buf.code_action) vim.keymap.set('n', 'K', vim.lsp.buf.hover) vim.keymap.set('n', 'KK', vim.lsp.buf.hover)