aboutsummaryrefslogtreecommitdiff
path: root/book/src
diff options
context:
space:
mode:
authorDoug Kelkhoff2023-01-21 20:20:59 +0000
committerGitHub2023-01-21 20:20:59 +0000
commit2b58ff4d7cc09bc48bcdd79096110eeb578b509f (patch)
tree2da392671e918f9fc826389ab1da2812da9d19c7 /book/src
parent8347139ff582341246975f047f04b4848f6e5af9 (diff)
Add configuration for min width of line-numbers gutter (#4724)
Diffstat (limited to 'book/src')
-rw-r--r--book/src/configuration.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/book/src/configuration.md b/book/src/configuration.md
index f89ef5ae..ab229f77 100644
--- a/book/src/configuration.md
+++ b/book/src/configuration.md
@@ -256,3 +256,55 @@ render = true
character = "╎" # Some characters that work well: "▏", "┆", "┊", "⸽"
skip-levels = 1
```
+
+### `[editor.gutters]` Section
+
+For simplicity, `editor.gutters` accepts an array of gutter types, which will
+use default settings for all gutter components.
+
+```toml
+[editor]
+gutters = ["diff", "diagnostics", "line-numbers", "spacer"]
+```
+
+To customize the behavior of gutters, the `[editor.gutters]` section must
+be used. This section contains top level settings, as well as settings for
+specific gutter components as sub-sections.
+
+| Key | Description | Default |
+| --- | --- | --- |
+| `layout` | A vector of gutters to display | `["diagnostics", "spacer", "line-numbers", "spacer", "diff"]` |
+
+Example:
+
+```toml
+[editor.gutters]
+layout = ["diff", "diagnostics", "line-numbers", "spacer"]
+```
+
+#### `[editor.gutters.line-numbers]` Section
+
+Options for the line number gutter
+
+| Key | Description | Default |
+| --- | --- | --- |
+| `min-width` | The minimum number of characters to use | `3` |
+
+Example:
+
+```toml
+[editor.gutters.line-numbers]
+min-width = 1
+```
+
+#### `[editor.gutters.diagnotics]` Section
+
+Currently unused
+
+#### `[editor.gutters.diff]` Section
+
+Currently unused
+
+#### `[editor.gutters.spacer]` Section
+
+Currently unused \ No newline at end of file