3To override global configuration parameters, create a `config.toml` file located in your config directory:
5* Linux and Mac: `~/.config/helix/config.toml`
6* Windows: `%AppData%\helix\config.toml`
8> Hint: You can easily open the config file by typing `:config-open` within Helix normal mode.
16line-number = "relative"
28You may also specify a file to use for configuration with the `-c` or
29`--config` CLI argument: `hx -c path/to/custom-config.toml`.
31It is also possible to trigger configuration file reloading by sending the `USR1`
32signal to the helix process, e.g. via `pkill -USR1 hx`. This is only supported
33on unix operating systems.
39| Key | Description | Default |
41| `scrolloff` | Number of lines of padding around the edge of the screen when scrolling. | `5` |
42| `mouse` | Enable mouse mode. | `true` |
43| `middle-click-paste` | Middle click paste support. | `true` |
44| `scroll-lines` | Number of lines to scroll per scroll wheel step. | `3` |
45| `shell` | Shell to use when running external commands. | Unix: `["sh", "-c"]`<br/>Windows: `["cmd", "/C"]` |
46| `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` |
47| `cursorline` | Highlight all lines with a cursor. | `false` |
48| `cursorcolumn` | Highlight all columns with a cursor. | `false` |
49| `gutters` | Gutters to display: Available are `diagnostics` and `diff` and `line-numbers` and `spacer`, 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"]` |
50| `auto-completion` | Enable automatic pop up of auto-completion. | `true` |
51| `auto-format` | Enable automatic formatting on save. | `true` |
52| `auto-save` | Enable automatic saving on focus moving away from Helix. Requires [focus event support](https://github.com/helix-editor/helix/wiki/Terminal-Support) from your terminal. | `false` |
53| `idle-timeout` | Time in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant. | `400` |
54| `completion-trigger-len` | The min-length of word under cursor to trigger autocompletion | `2` |
55| `auto-info` | Whether to display infoboxes | `true` |
56| `true-color` | Set to `true` to override automatic detection of terminal truecolor support in the event of a false negative. | `false` |
57| `rulers` | List of column positions at which to display the rulers. Can be overridden by language specific `rulers` in `languages.toml` file. | `[]` |
58| `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` |
59| `color-modes` | Whether to color the mode indicator with different colors depending on the mode itself | `false` |
61### `[editor.statusline]` Section
63Allows configuring the statusline at the bottom of the editor.
65The configuration distinguishes between three areas of the status line:
67`[ ... ... LEFT ... ... | ... ... ... ... CENTER ... ... ... ... | ... ... RIGHT ... ... ]`
69Statusline elements can be defined as follows:
73left = ["mode", "spinner"]
75right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
81The `[editor.statusline]` key takes the following sub-keys:
83| Key | Description | Default |
85| `left` | A list of elements aligned to the left of the statusline | `["mode", "spinner", "file-name"]` |
86| `center` | A list of elements aligned to the middle of the statusline | `[]` |
87| `right` | A list of elements aligned to the right of the statusline | `["diagnostics", "selections", "position", "file-encoding"]` |
88| `separator` | The character used to separate elements in the statusline | `"│"` |
89| `mode.normal` | The text shown in the `mode` element for normal mode | `"NOR"` |
90| `mode.insert` | The text shown in the `mode` element for insert mode | `"INS"` |
91| `mode.select` | The text shown in the `mode` element for select mode | `"SEL"` |
93The following statusline elements can be configured:
96| ------ | ----------- |
97| `mode` | The current editor mode (`mode.normal`/`mode.insert`/`mode.select`) |
98| `spinner` | A progress spinner indicating LSP activity |
99| `file-name` | The path/name of the opened file |
100| `file-base-name` | The basename of the opened file |
101| `file-modification-indicator` | The indicator to show whether the file is modified (a `[+]` appears when there are unsaved changes) |
102| `file-encoding` | The encoding of the opened file if it differs from UTF-8 |
103| `file-line-ending` | The file line endings (CRLF or LF) |
104| `total-line-numbers` | The total line numbers of the opened file |
105| `file-type` | The type of the opened file |
106| `diagnostics` | The number of warnings and/or errors |
107| `workspace-diagnostics` | The number of warnings and/or errors on workspace |
108| `selections` | The number of active selections |
109| `primary-selection-length` | The number of characters currently in primary selection |
110| `position` | The cursor position |
111| `position-percentage` | The cursor position as a percentage of the total number of lines |
112| `separator` | The string defined in `editor.statusline.separator` (defaults to `"│"`) |
113| `spacer` | Inserts a space between elements (multiple/contiguous spacers may be specified) |
115### `[editor.lsp]` Section
117| Key | Description | Default |
118| --- | ----------- | ------- |
119| `enable` | Enables LSP integration. Setting to false will completely disable language servers regardless of language settings.| `true` |
120| `display-messages` | Display LSP progress messages below statusline[^1] | `false` |
121| `auto-signature-help` | Enable automatic popup of signature help (parameter hints) | `true` |
122| `display-signature-help-docs` | Display docs under signature help popup | `true` |
124[^1]: By default, a progress spinner is shown in the statusline beside the file path.
126### `[editor.cursor-shape]` Section
128Defines the shape of cursor in each mode. Note that due to limitations
129of the terminal environment, only the primary cursor can change shape.
130Valid values for these options are `block`, `bar`, `underline`, or `hidden`.
132| Key | Description | Default |
133| --- | ----------- | ------- |
134| `normal` | Cursor shape in [normal mode][normal mode] | `block` |
135| `insert` | Cursor shape in [insert mode][insert mode] | `block` |
136| `select` | Cursor shape in [select mode][select mode] | `block` |
138[normal mode]: ./keymap.md#normal-mode
139[insert mode]: ./keymap.md#insert-mode
140[select mode]: ./keymap.md#select--extend-mode
142### `[editor.file-picker]` Section
144Sets options for file picker and global search. All but the last key listed in
145the default file-picker configuration below are IgnoreOptions: whether hidden
146files and files listed within ignore files are ignored by (not visible in) the
147helix file picker and global search. There is also one other key, `max-depth`
148available, which is not defined by default.
150All git related options are only enabled in a git repository.
152| Key | Description | Default |
154|`hidden` | Enables ignoring hidden files. | true
155|`follow-links` | Follow symlinks instead of ignoring them | true
156|`deduplicate-links` | Ignore symlinks that point at files already shown in the picker | true
157|`parents` | Enables reading ignore files from parent directories. | true
158|`ignore` | Enables reading `.ignore` files. | true
159|`git-ignore` | Enables reading `.gitignore` files. | true
160|`git-global` | Enables reading global .gitignore, whose path is specified in git's config: `core.excludefile` option. | true
161|`git-exclude` | Enables reading `.git/info/exclude` files. | true
162|`max-depth` | Set with an integer value for maximum depth to recurse. | Defaults to `None`.
164### `[editor.auto-pairs]` Section
166Enables automatic insertion of pairs to parentheses, brackets, etc. Can be a
167simple boolean value, or a specific mapping of pairs of single characters.
169To disable auto-pairs altogether, set `auto-pairs` to `false`:
173auto-pairs = false # defaults to `true`
176The default pairs are <code>(){}[]''""``</code>, but these can be customized by
177setting `auto-pairs` to a TOML table:
189Additionally, this setting can be used in a language config. Unless
190the editor setting is `false`, this will override the editor config in
191documents with this language.
193Example `languages.toml` that adds <> and removes ''
208### `[editor.search]` Section
210Search specific options.
212| Key | Description | Default |
214| `smart-case` | Enable smart case regex searching (case insensitive unless pattern contains upper case characters) | `true` |
215| `wrap-around`| Whether the search should wrap after depleting the matches | `true` |
217### `[editor.whitespace]` Section
219Options for rendering whitespace with visible characters. Use `:set whitespace.render all` to temporarily enable visible whitespace.
221| Key | Description | Default |
222|-----|-------------|---------|
223| `render` | Whether to render whitespace. May either be `"all"` or `"none"`, or a table with sub-keys `space`, `nbsp`, `tab`, and `newline`. | `"none"` |
224| `characters` | Literal characters to use when rendering whitespace. Sub-keys may be any of `tab`, `space`, `nbsp`, `newline` or `tabpad` | See example below |
231# or control each character
232[editor.whitespace.render]
237[editor.whitespace.characters]
242tabpad = "·" # Tabs will look like "→···" (depending on tab width)
245### `[editor.indent-guides]` Section
247Options for rendering vertical indent guides.
249| Key | Description | Default |
251| `render` | Whether to render indent guides. | `false` |
252| `character` | Literal character to use for rendering the indent guide | `│` |
253| `skip-levels` | Number of indent levels to skip | `0` |
258[editor.indent-guides]
260character = "╎" # Some characters that work well: "▏", "┆", "┊", "⸽"
264### `[editor.gutters]` Section
266For simplicity, `editor.gutters` accepts an array of gutter types, which will
267use default settings for all gutter components.
271gutters = ["diff", "diagnostics", "line-numbers", "spacer"]
274To customize the behavior of gutters, the `[editor.gutters]` section must
275be used. This section contains top level settings, as well as settings for
276specific gutter components as sub-sections.
278| Key | Description | Default |
280| `layout` | A vector of gutters to display | `["diagnostics", "spacer", "line-numbers", "spacer", "diff"]` |
286layout = ["diff", "diagnostics", "line-numbers", "spacer"]
289#### `[editor.gutters.line-numbers]` Section
291Options for the line number gutter
293| Key | Description | Default |
295| `min-width` | The minimum number of characters to use | `3` |
300[editor.gutters.line-numbers]
304#### `[editor.gutters.diagnotics]` Section
308#### `[editor.gutters.diff]` Section
312#### `[editor.gutters.spacer]` Section
316### `[editor.soft-wrap]` Section
318Options for soft wrapping lines that exceed the view width
320| Key | Description | Default |
322| `enable` | Whether soft wrapping is enabled. | `false` |
323| `max-wrap` | Maximum free space left at the end of the line. | `20` |
324| `max-indent-retain` | Maximum indentation to carry over when soft wrapping a line. | `40` |
325| `wrap-indicator` | Text inserted before soft wrapped lines, highlighted with `ui.virtual.wrap` | `↪ ` |
332max-wrap = 25 # increase value to reduce forced mid-word wrapping
334wrap-indicator = "" # set wrap-indicator to "" to hide it
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list