From 75471935c0bd9392f71828bc36061c587b98fde0 Mon Sep 17 00:00:00 2001 From: Belal Elsabbagh Date: Wed, 4 Feb 2026 07:56:25 +0200 Subject: [PATCH] diagnostics --- .config/nvim/init.lua | 16 +++++++++++++--- .../{nvim-treesitter.lua => treesitter.lua} | 0 2 files changed, 13 insertions(+), 3 deletions(-) rename .config/nvim/lua/plugins/{nvim-treesitter.lua => treesitter.lua} (100%) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 64d2f40..a9f1851 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -82,10 +82,20 @@ vim.lsp.config('*', { capabilities = capabilities, }) +-- Diagnostic Config & Keymaps +-- See :help vim.diagnostic.Opts vim.diagnostic.config { - virtual_lines = { - current_line = true, - }, + update_in_insert = false, + severity_sort = true, + float = { border = 'rounded', source = 'if_many' }, + underline = { severity = vim.diagnostic.severity.ERROR }, + + -- Can switch between these as you prefer + virtual_text = true, -- Text shows up at the end of the line + virtual_lines = false, -- Teest shows up underneath the line, with virtual lines + + -- Auto open the float, so you can easily read the errors when jumping with `[d` and `]d` + jump = { float = true }, } -- Brief aside: **What is LSP?** diff --git a/.config/nvim/lua/plugins/nvim-treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua similarity index 100% rename from .config/nvim/lua/plugins/nvim-treesitter.lua rename to .config/nvim/lua/plugins/treesitter.lua