summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTobias Pisani <topisani@hamsterpoison.com>2024-03-26 19:30:08 +0100
committerTobias Pisani <topisani@hamsterpoison.com>2024-03-27 04:07:12 +0100
commitb9c60e2578b8a9389556b621b67731cdfc4b2c93 (patch)
tree62740afd5d4faad6328216faf4619f5a36669c09 /doc
parent610d4114a92a31819f45b734dddb4f173b661168 (diff)
Add -indent option to show-whitespace highlighter
A couple of semi-opinionated choices were made in this implementation: 1. The guide is hidden in the first column. 2. The indent guides are highlighted using a new `WhitespaceIndent` face. 3. Nothing is done to continue the guide through empty lines. I believe this to be the correct approach, at least as long as it is kept as a part of the show-whitespaces highlighter. However some people's oppinion may differ, and if so, that could be implemented. 4. The guides default to on, like the other show-whitespace options. Default character is "│". 5. Spaces between the indent guides are currently highlighted as other spaces. Other reasonable options would be no replacement, -tabpad, or a similar -indentpad. 6. Guides are disabled by passing `-indent ""`. 7. Indent guides are separate from tab highlighting. Additionally, we could consider adding a separate face for the "current" indent level as many editors do, but this is a bit harder in kakoune because of multiple selections. Closes #2323
Diffstat (limited to 'doc')
-rw-r--r--doc/pages/highlighters.asciidoc4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/pages/highlighters.asciidoc b/doc/pages/highlighters.asciidoc
index 7628dbba..32788736 100644
--- a/doc/pages/highlighters.asciidoc
+++ b/doc/pages/highlighters.asciidoc
@@ -55,6 +55,10 @@ highlighter is replaced with the new one.
*-tabpad* <separator>:::
a one character long separator that will be appended to tabulations to honor the *tabstop* option
+ *-indent* <separator>:::
+ a one character long separator that will replace the first space in indentation according to the *indentwidth* option
+ This will use the `WhitespaceIndent` face.
+
*-only-trailing*:::
only highlight whitespaces at the end of the line