aboutsummaryrefslogtreecommitdiff
path: root/book/src
diff options
context:
space:
mode:
authorOmnikar2021-12-01 22:59:23 +0000
committerBlaž Hrastnik2022-04-20 02:37:23 +0000
commite6b865ed0b1b77934733d86b59d60870e9f5881f (patch)
treef090ee3a7078b3109102abb3f555acb241ef4cd5 /book/src
parent94eba0e66aa193c093b1d7eefc0e21391cb2485f (diff)
allow whitespace to be rendered
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Diffstat (limited to 'book/src')
-rw-r--r--book/src/configuration.md26
-rw-r--r--book/src/themes.md2
2 files changed, 27 insertions, 1 deletions
diff --git a/book/src/configuration.md b/book/src/configuration.md
index 153ebb80..fea60d2f 100644
--- a/book/src/configuration.md
+++ b/book/src/configuration.md
@@ -137,3 +137,29 @@ Search specific options.
|--|--|---------|
| `smart-case` | Enable smart case regex searching (case insensitive unless pattern contains upper case characters) | `true` |
| `wrap-around`| Whether the search should wrap after depleting the matches | `true` |
+
+### `[editor.whitespace]` Section
+
+Options for rendering whitespace with visible characters. Use `:set whitespace.render all` to temporarily enable visible whitespace.
+
+| Key | Description | Default |
+|-----|-------------|---------|
+| `render` | Whether to render whitespace. May either be `"all"` or `"none"`, or a table with sub-keys `space`, `tab`, and `newline`. | `"none"` |
+| `characters` | Literal characters to use when rendering whitespace. Sub-keys may be any of `tab`, `space` or `newline` | See example below |
+
+Example
+
+```toml
+[editor.whitespace]
+render = "all"
+# or control each character
+[editor.whitespace.render]
+space = "all"
+tab = "all"
+newline = "none"
+
+[editor.whitespace.characters]
+space = "·"
+tab = "→"
+newline = "⏎"
+```
diff --git a/book/src/themes.md b/book/src/themes.md
index e23dbb69..9009e2ca 100644
--- a/book/src/themes.md
+++ b/book/src/themes.md
@@ -224,6 +224,7 @@ These scopes are used for theming the editor interface.
| `ui.text` | Command prompts, popup text, etc. |
| `ui.text.focus` | |
| `ui.text.info` | The key: command text in `ui.popup.info` boxes |
+| `ui.virtual.whitespace` | Visible white-space characters |
| `ui.menu` | Code and command completion menus |
| `ui.menu.selected` | Selected autocomplete item |
| `ui.selection` | For selections in the editing area |
@@ -233,4 +234,3 @@ These scopes are used for theming the editor interface.
| `info` | Diagnostics info (gutter) |
| `hint` | Diagnostics hint (gutter) |
| `diagnostic` | For text in editing area |
-