diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-10 12:32:48 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-10 12:41:25 +0100 |
| commit | 63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch) | |
| tree | 41cd5d2d1ec36e74e464caab722cc9b460153f04 /.vim/plugin/diagnostics.lua | |
| parent | 5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff) | |
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.vim/plugin/diagnostics.lua')
| -rw-r--r-- | .vim/plugin/diagnostics.lua | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/.vim/plugin/diagnostics.lua b/.vim/plugin/diagnostics.lua deleted file mode 100644 index 93ee621..0000000 --- a/.vim/plugin/diagnostics.lua +++ /dev/null @@ -1,63 +0,0 @@ -vim.diagnostic.config({ - signs = { - text = { - [vim.diagnostic.severity.ERROR] = '✗', - [vim.diagnostic.severity.WARN] = '▷', - [vim.diagnostic.severity.INFO] = 'ℹ', - [vim.diagnostic.severity.HINT] = '🞶', - }, - linehl = { - -- [vim.diagnostic.severity.ERROR] = 'Search', - -- [vim.diagnostic.severity.WARN] = '', - -- [vim.diagnostic.severity.INFO] = '', - -- [vim.diagnostic.severity.HINT] = '', - }, - numhl = { - [vim.diagnostic.severity.ERROR] = 'DiagnosticSignError', - [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', - [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', - [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', - }, - }, - severity_sort = true, - underline = { - severity = { min = vim.diagnostic.severity.WARN }, - }, - float = false, - virtual_text = false, - virtual_lines = false, -}) - -local commonhl = { undercurl = true, force = true } -vim.api.nvim_set_hl(0, 'DiagnosticUnderlineError', commonhl) -vim.api.nvim_set_hl(0, 'DiagnosticUnderlineWarn', commonhl) -vim.api.nvim_set_hl(0, 'DiagnosticUnderlineInfo', commonhl) -vim.api.nvim_set_hl(0, 'DiagnosticUnderlineHint', commonhl) - -vim.keymap.set('n', '[d', function() - vim.diagnostic.jump({ count = 1, float = true }) -end, { desc = 'diagnostic: next' }) - -vim.keymap.set('n', ']d', function() - vim.diagnostic.jump({ count = -1, float = true }) -end, { desc = 'diagnostic: prev' }) - -vim.keymap.set('n', 'DD', vim.diagnostic.open_float, { desc = 'diagnostic: current line' }) - -vim.keymap.set('n', '<leader>td', function() - -- NOTE: this can be used to switch between multiple sets of diagnostics display - -- currently it only toggles virtual_text - local visible = vim.diagnostic.config().virtual_text - - if visible then - -- vim.diagnostic.hide(nil, 0) - vim.diagnostic.config({ virtual_text = false }) - else - -- vim.diagnostic.show(nil, 0) - vim.diagnostic.config({ virtual_text = true }) - end -end, { desc = 'diagnostic: toggle visibility' }) - -vim.keymap.set('n', '<leader>tD', function() - vim.diagnostic.enable(not vim.diagnostic.is_enabled()) -end, { desc = 'diagnostic: toggle all' }) |