aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubén Santos <ribal@dontgiveahack.com>2025-11-12 10:59:25 +0100
committerRubén Santos <ribal@dontgiveahack.com>2025-11-12 10:59:25 +0100
commit2888298f9cb66a09ab4580f83c3518850fe34c3a (patch)
tree284cfbc026f1d400eb7794ea4d3c68a74a6cf174
parent8d505da65ad325732fa35abcf4032c9b1883c0af (diff)
downloadvis-lspc-2888298f9cb66a09ab4580f83c3518850fe34c3a.tar.gz
vis-lspc-2888298f9cb66a09ab4580f83c3518850fe34c3a.zip
Add default bindings for diagnostics navigation
-rw-r--r--README.md2
-rw-r--r--bindings.lua8
2 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index 8475982..a9e9df6 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,8 @@ Alternatively, a plugin manager like [vis-plug](https://github.com/erf/vis-plug)
< D> - jump to type definition
<C-t> - go back in the jump history
< e> - show diagnostics of current line
+ < n> - jump to the next available diagnostic
+ < N> - jump to the previous available diagnostic
<K> - hover over current position
Normal and Insert mode:
<C- > - get completions
diff --git a/bindings.lua b/bindings.lua
index a71c970..06acf26 100644
--- a/bindings.lua
+++ b/bindings.lua
@@ -66,6 +66,14 @@ vis:map(vis.modes.NORMAL, ' e', function()
vis:command('lspc-show-diagnostics')
end, 'lspc: show diagnostic of current line')
+vis:map(vis.modes.NORMAL, ' n', function()
+ vis:command('lspc-next-diagnostic')
+end, 'lspc: jump to the next available diagnostic')
+
+vis:map(vis.modes.NORMAL, ' N', function()
+ vis:command('lspc-prev-diagnostic')
+end, 'lspc: jump to the previous available diagnostic')
+
vis:map(vis.modes.NORMAL, 'K', function()
vis:command('lspc-hover')
end, 'lspc: hover over current position')