diff options
Diffstat (limited to 'book/src')
-rw-r--r-- | book/src/configuration.md | 23 | ||||
-rw-r--r-- | book/src/languages.md | 2 |
2 files changed, 23 insertions, 2 deletions
diff --git a/book/src/configuration.md b/book/src/configuration.md index ab229f77..528fafd0 100644 --- a/book/src/configuration.md +++ b/book/src/configuration.md @@ -307,4 +307,25 @@ Currently unused #### `[editor.gutters.spacer]` Section -Currently unused
\ No newline at end of file +Currently unused + +### `[editor.soft-wrap]` Section + +Options for soft wrapping lines that exceed the view width + +| Key | Description | Default | +| --- | --- | --- | +| `enable` | Whether soft wrapping is enabled. | `false` | +| `max-wrap` | Maximum free space left at the end of the line. | `20` | +| `max-indent-retain` | Maximum indentation to carry over when soft wrapping a line. | `40` | +| `wrap-indicator` | Text inserted before soft wrapped lines, highlighted with `ui.virtual.wrap` | `↪ ` | + +Example: + +```toml +[editor.soft-wrap] +enable = true +max-wrap = 25 # increase value to reduce forced mid-word wrapping +max-indent-retain = 0 +wrap-indicator = "" # set wrap-indicator to "" to hide it +``` diff --git a/book/src/languages.md b/book/src/languages.md index ff06dc00..0646b9af 100644 --- a/book/src/languages.md +++ b/book/src/languages.md @@ -61,7 +61,7 @@ These configuration keys are available: | `config` | Language Server configuration | | `grammar` | The tree-sitter grammar to use (defaults to the value of `name`) | | `formatter` | The formatter for the language, it will take precedence over the lsp when defined. The formatter must be able to take the original file as input from stdin and write the formatted file to stdout | -| `max-line-length` | Maximum line length. Used for the `:reflow` command | +| `max-line-length` | Maximum line length. Used for the `:reflow` command and soft-wrapping | ### File-type detection and the `file-types` key |