Debian Codegraph @

book/src/editor.md

raw symbols SCIP
1 ## Editor
2
3 - [`[editor]` Section](#editor-section)
4 - [`[editor.clipboard-provider]` Section](#editorclipboard-provider-section)
5 - [`[editor.statusline]` Section](#editorstatusline-section)
6 - [`[editor.lsp]` Section](#editorlsp-section)
7 - [`[editor.cursor-shape]` Section](#editorcursor-shape-section)
8 - [`[editor.file-picker]` Section](#editorfile-picker-section)
9 - [`[editor.file-explorer]` Section](#editorfile-explorer-section)
10 - [`[editor.buffer-picker]` Section](#editorbuffer-picker-section)
11 - [`[editor.auto-pairs]` Section](#editorauto-pairs-section)
12 - [`[editor.auto-save]` Section](#editorauto-save-section)
13 - [`[editor.search]` Section](#editorsearch-section)
14 - [`[editor.whitespace]` Section](#editorwhitespace-section)
15 - [`[editor.indent-guides]` Section](#editorindent-guides-section)
16 - [`[editor.gutters]` Section](#editorgutters-section)
17 - [`[editor.gutters.line-numbers]` Section](#editorguttersline-numbers-section)
18 - [`[editor.gutters.diagnostics]` Section](#editorguttersdiagnostics-section)
19 - [`[editor.gutters.diff]` Section](#editorguttersdiff-section)
20 - [`[editor.gutters.spacer]` Section](#editorguttersspacer-section)
21 - [`[editor.gutters.code-action-hint]` Section](#editorgutterscode-action-hint-section)
22 - [`[editor.soft-wrap]` Section](#editorsoft-wrap-section)
23 - [`[editor.smart-tab]` Section](#editorsmart-tab-section)
24 - [`[editor.inline-diagnostics]` Section](#editorinline-diagnostics-section)
25 - [`[editor.word-completion]` Section](#editorword-completion-section)
26 - [`[editor.workspace-trust]` Section](#editorworkspace-trust-section)
27
28 ### `[editor]` Section
29
30 | Key | Description | Default |
31 |--|--|---------|
32 | `scrolloff` | Number of lines of padding around the edge of the screen when scrolling | `5` |
33 | `mouse` | Enable mouse mode | `true` |
34 | `mouse-yank-register` | Which register to use for mouse yanks. | `*` |
35 | `middle-click-paste` | Middle click paste support | `true` |
36 | `default-yank-register` | Default register used for yank/paste | `'"'` |
37 | `scroll-lines` | Number of lines to scroll per scroll wheel step | `3` |
38 | `shell` | Shell to use when running external commands | Unix: `["sh", "-c"]`<br/>Windows: `["cmd", "/C"]` |
39 | `line-number` | Line number display: `absolute` simply shows each line's number, while `relative` shows the distance from the current line. When unfocused or in insert mode, `relative` will still show absolute line numbers | `"absolute"` |
40 | `cursorline` | Highlight all lines with a cursor | `false` |
41 | `cursorcolumn` | Highlight all columns with a cursor | `false` |
42 | `continue-comments` | if helix should automatically add a line comment token if you create a new line inside a comment. | `true` |
43 | `gutters` | Gutters to display: Available are `diagnostics` and `diff` and `line-numbers` and `spacer` and `code-action-hint`, note that `diagnostics` also includes other features like breakpoints, 1-width padding will be inserted if gutters is non-empty | `["diagnostics", "spacer", "line-numbers", "spacer", "diff"]` |
44 | `auto-completion` | Enable automatic pop up of auto-completion | `true` |
45 | `path-completion` | Enable filepath completion. Show files and directories if an existing path at the cursor was recognized, either absolute or relative to the current opened document or current working directory (if the buffer is not yet saved). Defaults to true. | `true` |
46 | `auto-format` | Enable automatic formatting on save[^3] | `true` |
47 | `idle-timeout` | Time in milliseconds since last keypress before idle timers trigger. | `250` |
48 | `completion-timeout` | Time in milliseconds after typing a word character before completions are shown, set to 5 for instant. | `250` |
49 | `preview-completion-insert` | Whether to apply completion item instantly when selected | `true` |
50 | `completion-trigger-len` | The min-length of word under cursor to trigger autocompletion | `2` |
51 | `completion-replace` | Whether to make completions always replace the entire word and not just the part before the cursor | `false` |
52 | `auto-info` | Whether to display info boxes | `true` |
53 | `true-color` | Whether to override automatic detection of terminal truecolor support in the event of a false negative | `false` |
54 | `undercurl` | Whether to override automatic detection of terminal undercurl support in the event of a false negative | `false` |
55 | `rulers` | List of column positions at which to display the rulers. Can be overridden by language specific `rulers` in `languages.toml` file | `[]` |
56 | `bufferline` | Renders a line at the top of the editor displaying open buffers. Can be `always`, `never` or `multiple` (only shown if more than one buffer is in use) | `"never"` |
57 | `color-modes` | Whether to color the mode indicator with different colors depending on the mode itself | `false` |
58 | `text-width` | Maximum line length. Used for the `:reflow` command and soft-wrapping if `soft-wrap.wrap-at-text-width` is set | `80` |
59 | `workspace-lsp-roots` | Directories relative to the workspace root that are treated as LSP roots. Should only be set in `.helix/config.toml` | `[]` |
60 | `default-line-ending` | The line ending to use for new documents. Can be `native`, `lf`, `crlf`, `ff`, `cr` or `nel`. `native` uses the platform's native line ending (`crlf` on Windows, otherwise `lf`). | `"native"` |
61 | `insert-final-newline` | Whether to automatically insert a trailing line-ending on write if missing | `true` |
62 | `atomic-save` | Whether to use atomic operations to write documents to disk. This prevents data loss if the editor is interrupted while writing the file, but may confuse some file watching/hot reloading programs. | `true` |
63 | `trim-final-newlines` | Whether to automatically remove line-endings after the final one on write | `false` |
64 | `trim-trailing-whitespace` | Whether to automatically remove whitespace preceding line endings on write | `false` |
65 | `popup-border` | Draw border around `popup`, `menu`, `all`, or `none` | `"none"` |
66 | `indent-heuristic` | How the indentation for a newly inserted line is computed: `simple` just copies the indentation level from the previous line, `tree-sitter` computes the indentation based on the syntax tree and `hybrid` combines both approaches. If the chosen heuristic is not available, a different one will be used as a fallback (the fallback order being `hybrid` -> `tree-sitter` -> `simple`). | `"hybrid"` |
67 | `jump-label-alphabet` | The characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first. | `"abcdefghijklmnopqrstuvwxyz"` |
68 | `end-of-line-diagnostics` | Minimum severity of diagnostics to render at the end of the line. Set to `disable` to disable entirely. Refer to the setting about `inline-diagnostics` for more details | `"hint"` |
69 | `clipboard-provider` | Which API to use for clipboard interaction. One of `pasteboard` (MacOS), `wayland`, `x-clip`, `x-sel`, `win32-yank`, `termux`, `tmux`, `windows`, `termcode`, `none`, or a custom command set. | Platform and environment specific. |
70 | `editor-config` | Whether to read settings from [EditorConfig](https://editorconfig.org) files | `true` |
71 | `rainbow-brackets` | Whether to render rainbow colors for matching brackets. Requires tree-sitter `rainbows.scm` queries for the language. | `false` |
72 | `kitty-keyboard-protocol` | Whether to enable Kitty Keyboard Protocol. Can be `enabled`, `disabled` or `auto` | `"auto"` |
73
74 [^3]: In most cases, you also need to enable the `auto-format` setting under `languages.toml`. You can find the reasoning [here](https://github.com/helix-editor/helix/discussions/9043#discussioncomment-7811497).
75
76 ### `[editor.clipboard-provider]` Section
77
78 Helix can be configured either to use a builtin clipboard configuration or to use
79 a provided command.
80
81 For instance, setting it to use OSC 52 termcodes, the configuration would be:
82 ```toml
83 [editor]
84 clipboard-provider = "termcode"
85 ```
86
87 Alternatively, Helix can be configured to use arbitrary commands for clipboard integration:
88
89 ```toml
90 [editor.clipboard-provider.custom]
91 yank = { command = "cat", args = ["test.txt"] }
92 paste = { command = "tee", args = ["test.txt"] }
93 primary-yank = { command = "cat", args = ["test-primary.txt"] } # optional
94 primary-paste = { command = "tee", args = ["test-primary.txt"] } # optional
95 ```
96
97 For custom commands the contents of the yank/paste is communicated over stdin/stdout.
98
99 ### `[editor.statusline]` Section
100
101 Allows configuring the statusline at the bottom of the editor.
102
103 The configuration distinguishes between three areas of the status line:
104
105 `[ ... ... LEFT ... ... | ... ... ... CENTER ... ... ... | ... ... RIGHT ... ... ]`
106
107 Statusline elements can be defined as follows:
108
109 ```toml
110 [editor.statusline]
111 left = ["mode", "spinner"]
112 center = ["file-name"]
113 right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
114 separator = "│"
115 mode.normal = "NORMAL"
116 mode.insert = "INSERT"
117 mode.select = "SELECT"
118 diagnostics = ["warning", "error"]
119 workspace-diagnostics = ["warning", "error"]
120 ```
121 The `[editor.statusline]` key takes the following sub-keys:
122
123 | Key | Description | Default |
124 | --- | --- | --- |
125 | `left` | A list of elements aligned to the left of the statusline | `["mode", "spinner", "file-name", "read-only-indicator", "file-modification-indicator"]` |
126 | `center` | A list of elements aligned to the middle of the statusline | `[]` |
127 | `right` | A list of elements aligned to the right of the statusline | `["diagnostics", "selections", "register", "position", "file-encoding"]` |
128 | `separator` | The character used to separate elements in the statusline | `"│"` |
129 | `mode.normal` | The text shown in the `mode` element for normal mode | `"NOR"` |
130 | `mode.insert` | The text shown in the `mode` element for insert mode | `"INS"` |
131 | `mode.select` | The text shown in the `mode` element for select mode | `"SEL"` |
132 | `diagnostics` | A list of severities which are displayed for the current buffer | `["warning", "error"]` |
133 | `workspace-diagnostics` | A list of severities which are displayed for the workspace | `["warning", "error"]` |
134
135 The following statusline elements can be configured:
136
137 | Key | Description |
138 | ------ | ----------- |
139 | `mode` | The current editor mode (`mode.normal`/`mode.insert`/`mode.select`) |
140 | `spinner` | A progress spinner indicating LSP activity |
141 | `file-name` | The path/name of the opened file |
142 | `file-absolute-path` | The absolute path/name of the opened file |
143 | `file-base-name` | The basename of the opened file |
144 | `current-working-directory` | The current working directory |
145 | `file-modification-indicator` | The indicator to show whether the file is modified (a `[+]` appears when there are unsaved changes) |
146 | `file-encoding` | The encoding of the opened file if it differs from UTF-8 |
147 | `file-line-ending` | The file line endings (CRLF or LF) |
148 | `file-indent-style` | The file indentation style |
149 | `read-only-indicator` | An indicator that shows `[readonly]` when a file cannot be written |
150 | `total-line-numbers` | The total line numbers of the opened file |
151 | `file-type` | The type of the opened file |
152 | `diagnostics` | The number of warnings and/or errors |
153 | `workspace-diagnostics` | The number of warnings and/or errors on workspace |
154 | `selections` | The primary selection index out of the number of active selections |
155 | `primary-selection-length` | The number of characters currently in primary selection |
156 | `position` | The cursor position |
157 | `position-percentage` | The cursor position as a percentage of the total number of lines |
158 | `separator` | The string defined in `editor.statusline.separator` (defaults to `"│"`) |
159 | `spacer` | Inserts a space between elements (multiple/contiguous spacers may be specified) |
160 | `version-control` | The current branch name or detached commit hash of the opened workspace |
161 | `register` | The current selected register |
162 | `code-action-hint` | Indicator for when code actions are available |
163
164 ### `[editor.lsp]` Section
165
166 | Key | Description | Default |
167 | --- | ----------- | ------- |
168 | `enable` | Enables LSP integration. Setting to false will completely disable language servers regardless of language settings.| `true` |
169 | `display-messages` | Display LSP `window/showMessage` messages below statusline[^1] | `true` |
170 | `display-progress-messages` | Display LSP progress messages below statusline[^1] | `false` |
171 | `auto-signature-help` | Enable automatic popup of signature help (parameter hints) | `true` |
172 | `auto-document-highlight` | Automatically highlight symbol references at the cursor | `false` |
173 | `display-inlay-hints` | Display inlay hints[^2] | `false` |
174 | `inlay-hints-length-limit` | Maximum displayed length (non-zero number) of inlay hints | Unset by default |
175 | `display-color-swatches` | Show color swatches next to colors | `true` |
176 | `display-signature-help-docs` | Display docs under signature help popup | `true` |
177 | `snippets` | Enables snippet completions. Requires a server restart (`:lsp-restart`) to take effect after `:config-reload`/`:set`. | `true` |
178 | `goto-reference-include-declaration` | Include declaration in the goto references popup. | `true` |
179
180 [^1]: By default, a progress spinner is shown in the statusline beside the file path.
181
182 [^2]: You may also have to activate them in the language server config for them to appear, not just in Helix. Inlay hints in Helix are still being improved on and may be a little bit laggy/janky under some circumstances. Please report any bugs you see so we can fix them!
183
184 ### `[editor.cursor-shape]` Section
185
186 Defines the shape of cursor in each mode.
187 Valid values for these options are `block`, `bar`, `underline`, or `hidden`.
188
189 > 💡 Due to limitations of the terminal environment, only the primary cursor can
190 > change shape.
191
192 | Key | Description | Default |
193 | --- | ----------- | ------- |
194 | `normal` | Cursor shape in [normal mode][normal mode] | `"block"` |
195 | `insert` | Cursor shape in [insert mode][insert mode] | `"block"` |
196 | `select` | Cursor shape in [select mode][select mode] | `"block"` |
197
198 [normal mode]: ./keymap.md#normal-mode
199 [insert mode]: ./keymap.md#insert-mode
200 [select mode]: ./keymap.md#select--extend-mode
201
202 ### `[editor.file-picker]` Section
203
204 Set options for file picker and global search. Ignoring a file means it is
205 not visible in the Helix file picker and global search.
206
207 All git related options are only enabled in a git repository.
208
209 | Key | Description | Default |
210 |--|--|---------|
211 |`hidden` | Enables ignoring hidden files | `true`
212 |`follow-symlinks` | Follow symlinks instead of ignoring them | `true`
213 |`deduplicate-links` | Ignore symlinks that point at files already shown in the picker | `true`
214 |`parents` | Enables reading ignore files from parent directories | `true`
215 |`ignore` | Enables reading `.ignore` files | `true`
216 |`git-ignore` | Enables reading `.gitignore` files | `true`
217 |`git-global` | Enables reading global `.gitignore`, whose path is specified in git's config: `core.excludesfile` option | `true`
218 |`git-exclude` | Enables reading `.git/info/exclude` files | `true`
219 |`max-depth` | Set with an integer value for maximum depth to recurse | Unset by default
220
221 Ignore files can be placed locally as `.ignore` or put in your home directory as `~/.ignore`. They support the usual ignore and negative ignore (unignore) rules used in `.gitignore` files.
222
223 Additionally, you can use Helix-specific ignore files by creating a local `.helix/ignore` file in the current workspace or a global `ignore` file located in your Helix config directory:
224 - Linux and Mac: `~/.config/helix/ignore`
225 - Windows: `%AppData%\helix\ignore`
226
227 Example:
228
229 ```ini
230 # unignore in file picker and global search
231 !.github/
232 !.gitignore
233 !.gitattributes
234 ```
235
236 ### `[editor.file-explorer]` Section
237
238 In addition to the options for the file picker and global search, a similar set of options is presented to configure the file explorer separately. However, unlike the file picker, the defaults are set to avoid ignoring most files.
239
240 Note that the ignore files consulted by the file explorer when `ignore` is set to true are the same ones used by the file picker, including the aforementioned Helix-specific ignore files.
241
242
243 | Key | Description | Default |
244 |--|--|---------|
245 |`hidden` | Enables ignoring hidden files | `false`
246 |`follow-symlinks` | Follow symlinks instead of ignoring them | `false`
247 |`parents` | Enables reading ignore files from parent directories | `false`
248 |`ignore` | Enables reading `.ignore` files | `false`
249 |`git-ignore` | Enables reading `.gitignore` files | `false`
250 |`git-global` | Enables reading global `.gitignore`, whose path is specified in git's config: `core.excludesfile` option | `false`
251 |`git-exclude` | Enables reading `.git/info/exclude` files | `false`
252 |`flatten-dirs` | Enables flattening single child directories | `true`
253
254 ### `[editor.buffer-picker]` Section
255
256 Set options for buffer picker.
257
258 | Key | Description | Default |
259 |--|--|---------|
260 |`start-position` | Controls behavior for which buffer is initially selected | `current` |
261
262 Example
263
264 ```toml
265 [editor.buffer-picker]
266 start-position = "previous"
267 ```
268
269 ### `[editor.auto-pairs]` Section
270
271 Enables automatic insertion of pairs to parentheses, brackets, etc. Can be a
272 simple boolean value, or a specific mapping of pairs of single characters.
273
274 To disable auto-pairs altogether, set `auto-pairs` to `false`:
275
276 ```toml
277 [editor]
278 auto-pairs = false # defaults to `true`
279 ```
280
281 The default pairs are <code>(){}[]''""``</code>, but these can be customized by
282 setting `auto-pairs` to a TOML table:
283
284 ```toml
285 [editor.auto-pairs]
286 '(' = ')'
287 '{' = '}'
288 '[' = ']'
289 '"' = '"'
290 '`' = '`'
291 '<' = '>'
292 ```
293
294 Additionally, this setting can be used in a language config. Unless
295 the editor setting is `false`, this will override the editor config in
296 documents with this language.
297
298 Example `languages.toml` that adds `<>` and removes `''`
299
300 ```toml
301 [[language]]
302 name = "rust"
303
304 [language.auto-pairs]
305 '(' = ')'
306 '{' = '}'
307 '[' = ']'
308 '"' = '"'
309 '`' = '`'
310 '<' = '>'
311 ```
312
313 ### `[editor.auto-save]` Section
314
315 Control auto save behavior.
316
317 | Key | Description | Default |
318 |--|--|---------|
319 | `focus-lost` | Enable automatic saving on the focus moving away from Helix. Requires [focus event support](https://github.com/helix-editor/helix/wiki/Terminal-Support) from your terminal | `false` |
320 | `after-delay.enable` | Enable automatic saving after `auto-save.after-delay.timeout` milliseconds have passed since last edit. | `false` |
321 | `after-delay.timeout` | Time in milliseconds since last edit before auto save timer triggers. | `3000` |
322
323 ### `[editor.search]` Section
324
325 Search specific options.
326
327 | Key | Description | Default |
328 |--|--|---------|
329 | `smart-case` | Enable smart case regex searching (case-insensitive unless pattern contains upper case characters) | `true` |
330 | `wrap-around`| Whether the search should wrap after depleting the matches | `true` |
331
332 ### `[editor.whitespace]` Section
333
334 Options for rendering whitespace with visible characters. Use `:set whitespace.render all` to temporarily enable visible whitespace.
335
336 | Key | Description | Default |
337 |-----|-------------|---------|
338 | `render` | Whether to render whitespace. May either be `all` or `none`, or a table with sub-keys `space`, `nbsp`, `nnbsp`, `tab`, and `newline` | `"none"` |
339 | `characters` | Literal characters to use when rendering whitespace. Sub-keys may be any of `tab`, `space`, `nbsp`, `nnbsp`, `newline` or `tabpad` | See example below |
340
341 Example
342
343 ```toml
344 [editor.whitespace]
345 render = "all"
346 # or control each character
347 [editor.whitespace.render]
348 space = "all"
349 tab = "all"
350 nbsp = "none"
351 nnbsp = "none"
352 newline = "none"
353
354 [editor.whitespace.characters]
355 space = "·"
356 nbsp = "⍽"
357 nnbsp = "␣"
358 tab = "→"
359 newline = "⏎"
360 tabpad = "·" # Tabs will look like "→···" (depending on tab width)
361 ```
362
363 ### `[editor.indent-guides]` Section
364
365 Options for rendering vertical indent guides.
366
367 | Key | Description | Default |
368 | --- | --- | --- |
369 | `render` | Whether to render indent guides | `false` |
370 | `character` | Literal character to use for rendering the indent guide | `"│"` |
371 | `skip-levels` | Number of indent levels to skip | `0` |
372
373 Example:
374
375 ```toml
376 [editor.indent-guides]
377 render = true
378 character = "╎" # Some characters that work well: "▏", "┆", "┊", "⸽"
379 skip-levels = 1
380 ```
381
382 ### `[editor.gutters]` Section
383
384 For simplicity, `editor.gutters` accepts an array of gutter types, which will
385 use default settings for all gutter components.
386
387 ```toml
388 [editor]
389 gutters = ["diff", "diagnostics", "line-numbers", "spacer"]
390 ```
391
392 To customize the behavior of gutters, the `[editor.gutters]` section must
393 be used. This section contains top level settings, as well as settings for
394 specific gutter components as subsections.
395
396 | Key | Description | Default |
397 | --- | --- | --- |
398 | `layout` | A vector of gutters to display | `["diagnostics", "spacer", "line-numbers", "spacer", "diff"]` |
399
400 Example:
401
402 ```toml
403 [editor.gutters]
404 layout = ["diff", "diagnostics", "line-numbers", "spacer"]
405 ```
406
407 #### `[editor.gutters.line-numbers]` Section
408
409 Options for the line number gutter
410
411 | Key | Description | Default |
412 | --- | --- | --- |
413 | `min-width` | The minimum number of characters to use | `3` |
414
415 Example:
416
417 ```toml
418 [editor.gutters.line-numbers]
419 min-width = 1
420 ```
421
422 #### `[editor.gutters.diagnostics]` Section
423
424 Currently unused
425
426 #### `[editor.gutters.diff]` Section
427
428 The `diff` gutter option displays colored bars indicating whether a `git` diff represents that a line was added, removed or changed.
429 These colors are controlled by the theme attributes `diff.plus`, `diff.minus` and `diff.delta`.
430
431 Other diff providers will eventually be supported by a future plugin system.
432
433 There are currently no options for this section.
434
435 #### `[editor.gutters.spacer]` Section
436
437 Currently unused
438
439 #### `[editor.gutters.code-action-hint]` Section
440
441 The `code-action-hint` gutter option displays an indicator for whether a code action is available at current selection.
442
443 There are currently no options for this section.
444
445 ### `[editor.soft-wrap]` Section
446
447 Options for soft wrapping lines that exceed the view width:
448
449 | Key | Description | Default |
450 | --- | --- | --- |
451 | `enable` | Whether soft wrapping is enabled. | `false` |
452 | `max-wrap` | Maximum free space left at the end of the line. | `20` |
453 | `max-indent-retain` | Maximum indentation to carry over when soft wrapping a line. | `40` |
454 | `wrap-indicator` | Text inserted before soft wrapped lines, highlighted with `ui.virtual.wrap` | `"↪ "` |
455 | `wrap-at-text-width` | Soft wrap at `text-width` instead of using the full viewport size. | `false` |
456
457 Example:
458
459 ```toml
460 [editor.soft-wrap]
461 enable = true
462 max-wrap = 25 # increase value to reduce forced mid-word wrapping
463 max-indent-retain = 0
464 wrap-indicator = "" # set wrap-indicator to "" to hide it
465 ```
466
467 ### `[editor.smart-tab]` Section
468
469 Options for navigating and editing using tab key.
470
471 | Key | Description | Default |
472 |------------|-------------|---------|
473 | `enable` | If set to true, then when the cursor is in a position with non-whitespace to its left, instead of inserting a tab, it will run `move_parent_node_end`. If there is only whitespace to the left, then it inserts a tab as normal. With the default bindings, to explicitly insert a tab character, press Shift-tab. | `true` |
474 | `supersede-menu` | Normally, when a menu is on screen, such as when auto complete is triggered, the tab key is bound to cycling through the items. This means when menus are on screen, one cannot use the tab key to trigger the `smart-tab` command. If this option is set to true, the `smart-tab` command always takes precedence, which means one cannot use the tab key to cycle through menu items. One of the other bindings must be used instead, such as arrow keys or `C-n`/`C-p`. | `false` |
475
476
477 Due to lack of support for S-tab in some terminals, the default keybindings don't fully embrace smart-tab editing experience. If you enjoy smart-tab navigation and a terminal that supports the [Enhanced Keyboard protocol](https://github.com/helix-editor/helix/wiki/Terminal-Support#enhanced-keyboard-protocol), consider setting extra keybindings:
478
479 ```toml
480 [keys.normal]
481 tab = "move_parent_node_end"
482 S-tab = "move_parent_node_start"
483
484 [keys.insert]
485 S-tab = "move_parent_node_start"
486
487 [keys.select]
488 tab = "extend_parent_node_end"
489 S-tab = "extend_parent_node_start"
490 ```
491
492 ### `[editor.inline-diagnostics]` Section
493
494 Options for rendering diagnostics inside the text like shown below
495
496 ```text
497 fn main() {
498 let foo = bar;
499 └─ no such value in this scope
500 }
501 ```
502
503 | Key | Description | Default |
504 |------------|-------------|---------|
505 | `cursor-line` | The minimum severity that a diagnostic must have to be shown inline on the line that contains the primary cursor. Set to `disable` to not show any diagnostics inline. This option does not have any effect when in insert-mode and will only take effect 350ms after moving the cursor to a different line. | `"warning"` |
506 | `other-lines` | The minimum severity that a diagnostic must have to be shown inline on a line that does not contain the cursor-line. Set to `disable` to not show any diagnostics inline. | `"disable"` |
507 | `prefix-len` | How many horizontal bars `─` are rendered before the diagnostic text. | `1` |
508 | `max-wrap` | Equivalent of the `editor.soft-wrap.max-wrap` option for diagnostics. | `20` |
509 | `max-diagnostics` | Maximum number of diagnostics to render inline for a given line | `10` |
510
511 The allowed values for `cursor-line` and `other-lines` are: `error`, `warning`, `info`, `hint`.
512
513 The (first) diagnostic with the highest severity that is not shown inline is rendered at the end of the line (as long as its severity is higher than the `end-of-line-diagnostics` config option):
514
515 ```text
516 fn main() {
517 let baz = 1;
518 let foo = bar; a local variable with a similar name exists: baz
519 └─ no such value in this scope
520 }
521 ```
522
523 ### `[editor.word-completion]` Section
524
525 Options for controlling completion of words from open buffers.
526
527 | Key | Description | Default |
528 | --- | --- | --- |
529 | `enable` | Whether word completion is enabled | `true` |
530 | `trigger-length` | Number of word characters to type before triggering completion | `7` |
531
532 Example:
533
534 ```toml
535 [editor.word-completion]
536 enable = true
537 # Set the trigger length lower so that words are completed more often
538 trigger-length = 4
539 ```
540
541 ### `[editor.workspace-trust]` Section
542
543 Controls implicit workspace trust. See the [workspace
544 trust](./workspace-trust.md) chapter for the full feature.
545
546 | Key | Description | Default |
547 | --- | --- | --- |
548 | `level` | The default level of trust for every workspace. | `"servers"` |
549 | `prompt` | Whether to show a modal when opening a file in an untrusted workspace. | `true` |
550 | `trusted` | Glob patterns whose matching workspaces are trusted without a grant. | `[]` |
551
552 Example:
553
554 ```toml
555 [editor.workspace-trust]
556 # Even if `false`, the statusline `[⚠]` indicator is still shown.
557 prompt = false
558
559 # "none": prompt for every workspace.
560 # "servers": trust LSP and DAP launches but still gate local config and git;
561 # .helix/config.toml, .helix/languages.toml, etc. need :workspace-trust.
562 # "insecure": trust everything (discouraged).
563 level = "servers"
564
565 # Discouraged: skips .helix/ change detection and trusts anything that lands
566 # under a matching path. `~` and environment variables are expanded.
567 trusted = ["~/src/github.com/me/*"]
568 ```