Configuration

To override global configuration parameters, create a config.toml file located in your config directory:

  • Linux and Mac: ~/.config/helix/config.toml
  • Windows: %AppData%\helix\config.toml

Example config:

theme = "onedark"

[editor]
line-number = "relative"
mouse = false

[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"

[editor.file-picker]
hidden = false

Editor

[editor] Section

KeyDescriptionDefault
scrolloffNumber of lines of padding around the edge of the screen when scrolling.3
mouseEnable mouse mode.true
middle-click-pasteMiddle click paste support.true
scroll-linesNumber of lines to scroll per scroll wheel step.3
shellShell to use when running external commands.Unix: ["sh", "-c"]
Windows: ["cmd", "/C"]
line-numberLine 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
auto-completionEnable automatic pop up of auto-completion.true
idle-timeoutTime in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant.400
completion-trigger-lenThe min-length of word under cursor to trigger autocompletion2
auto-infoWhether to display infoboxestrue
true-colorSet to true to override automatic detection of terminal truecolor support in the event of a false negative.false

[editor.cursor-shape] Section

Defines the shape of cursor in each mode. Note that due to limitations of the terminal environment, only the primary cursor can change shape.

KeyDescriptionDefault
normalCursor shape in normal modeblock
insertCursor shape in insert modeblock
selectCursor shape in select modeblock

[editor.file-picker] Section

Sets options for file picker and global search. All but the last key listed in the default file-picker configuration below are IgnoreOptions: whether hidden files and files listed within ignore files are ignored by (not visible in) the helix file picker and global search. There is also one other key, max-depth available, which is not defined by default.

KeyDescriptionDefault
hiddenEnables ignoring hidden files.true
parentsEnables reading ignore files from parent directories.true
ignoreEnables reading .ignore files.true
git-ignoreEnables reading .gitignore files.true
git-globalEnables reading global .gitignore, whose path is specified in git's config: core.excludefile option.true
git-excludeEnables reading .git/info/exclude files.true
max-depthSet with an integer value for maximum depth to recurse.Defaults to None.

[editor.auto-pairs] Section

Enable automatic insertion of pairs to parentheses, brackets, etc. Can be a simple boolean value, or a specific mapping of pairs of single characters.

KeyDescription
falseCompletely disable auto pairing, regardless of language-specific settings
trueUse the default pairs: (){}[]''""``
Mapping of pairse.g. { "(" = ")", "{" = "}", ... }

Example

[editor.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'
'`' = '`'
'<' = '>'

Additionally, this setting can be used in a language config. Unless the editor setting is false, this will override the editor config in documents with this language.

Example languages.toml that adds <> and removes ''

[[language]]
name = "rust"

[language.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'
'`' = '`'
'<' = '>'

[editor.search] Section

Search specific options.

KeyDescriptionDefault
smart-caseEnable smart case regex searching (case insensitive unless pattern contains upper case characters)true
wrap-aroundWhether the search should wrap after depleting the matchestrue

LSP

To display all language server messages in the status line add the following to your config.toml:

[lsp]
display-messages = true