aboutsummaryrefslogtreecommitdiff
path: root/book
diff options
context:
space:
mode:
Diffstat (limited to 'book')
-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 |
-