From 2244a5d40c83d477839f91cb6d6a4aeb02446a97 Mon Sep 17 00:00:00 2001 From: omentic Date: Wed, 1 May 2024 23:29:52 +0000 Subject: deploy: 12eec890240a05d1e090114f7f4fdd7c1ee8ff88 --- configuration.html | 166 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 101 insertions(+), 65 deletions(-) (limited to 'configuration.html') diff --git a/configuration.html b/configuration.html index 611e69f9..b55414a4 100644 --- a/configuration.html +++ b/configuration.html @@ -189,16 +189,16 @@

πŸ’‘ You can easily open the config file by typing :config-open within Helix normal mode.

Example config:

-
theme = "onedark"
+
theme = "onedark"
 
 [editor]
-line-number = "relative"
+line-number = "relative"
 mouse = false
 
 [editor.cursor-shape]
-insert = "bar"
-normal = "block"
-select = "underline"
+insert = "bar"
+normal = "block"
+select = "underline"
 
 [editor.file-picker]
 hidden = false
@@ -216,15 +216,16 @@ Its settings will be merged with the configuration directory config.tomlmouseEnable mouse modetrue
 middle-click-pasteMiddle click paste supporttrue
 scroll-linesNumber of lines to scroll per scroll wheel step3
-shellShell to use when running external commandsUnix: ["sh", "-c"]
Windows: ["cmd", "/C"] +shellShell to use when running external commandsUnix: ["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 numbersabsolute cursorlineHighlight all lines with a cursorfalse cursorcolumnHighlight all columns with a cursorfalse -guttersGutters 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"] +guttersGutters 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"] auto-completionEnable automatic pop up of auto-completiontrue auto-formatEnable automatic formatting on savetrue auto-saveEnable automatic saving on the focus moving away from Helix. Requires focus event support from your terminalfalse -idle-timeoutTime in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant400 +idle-timeoutTime in milliseconds since last keypress before idle timers trigger.250 +completion-timeoutTime in milliseconds after typing a word character before completions are shown, set to 5 for instant.250 preview-completion-insertWhether to apply completion item instantly when selectedtrue completion-trigger-lenThe min-length of word under cursor to trigger autocompletion2 completion-replaceSet to true to make completions always replace the entire word and not just the part before the cursorfalse @@ -233,38 +234,41 @@ Its settings will be merged with the configuration directory config.tomlundercurlSet to true to override automatic detection of terminal undercurl support in the event of a false negativefalse rulersList of column positions at which to display the rulers. Can be overridden by language specific rulers in languages.toml file[] bufferlineRenders 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 -initial-modeThe initial mode for newly opened editors."normal" color-modesWhether to color the mode indicator with different colors depending on the mode itselffalse text-widthMaximum line length. Used for the :reflow command and soft-wrapping if soft-wrap.wrap-at-text-width is set80 workspace-lsp-rootsDirectories relative to the workspace root that are treated as LSP roots. Should only be set in .helix/config.toml[] default-line-endingThe 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 insert-final-newlineWhether to automatically insert a trailing line-ending on write if missingtrue +popup-borderDraw border around popup, menu, all, or nonenone +indent-heuristicHow 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 +jump-label-alphabetThe characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first."abcdefghijklmnopqrstuvwxyz" +initial-modeThe initial mode for newly opened editors."normal" rainbow-bracketsWhether to render rainbow colors for matching brackets. Requires tree-sitter rainbows.scm queries for the language.false

[editor.statusline] Section

Allows configuring the statusline at the bottom of the editor.

The configuration distinguishes between three areas of the status line:

-

[ ... ... LEFT ... ... | ... ... ... ... CENTER ... ... ... ... | ... ... RIGHT ... ... ]

+

[ ... ... LEFT ... ... | ... ... ... CENTER ... ... ... | ... ... RIGHT ... ... ]

Statusline elements can be defined as follows:

[editor.statusline]
-left = ["mode", "spinner"]
-center = ["file-name"]
-right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
-separator = "β”‚"
-mode.normal = "NORMAL"
-mode.insert = "INSERT"
-mode.select = "SELECT"
+left = ["mode", "spinner"]
+center = ["file-name"]
+right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
+separator = "β”‚"
+mode.normal = "NORMAL"
+mode.insert = "INSERT"
+mode.select = "SELECT"
 

The [editor.statusline] key takes the following sub-keys:

- + - - - - - + + + + +
KeyDescriptionDefault
leftA list of elements aligned to the left of the statusline["mode", "spinner", "file-name", "read-only-indicator", "file-modification-indicator"]
leftA list of elements aligned to the left of the statusline["mode", "spinner", "file-name", "read-only-indicator", "file-modification-indicator"]
centerA list of elements aligned to the middle of the statusline[]
rightA list of elements aligned to the right of the statusline["diagnostics", "selections", "register", "position", "file-encoding"]
separatorThe character used to separate elements in the statusline"β”‚"
mode.normalThe text shown in the mode element for normal mode"NOR"
mode.insertThe text shown in the mode element for insert mode"INS"
mode.selectThe text shown in the mode element for select mode"SEL"
rightA list of elements aligned to the right of the statusline["diagnostics", "selections", "register", "position", "file-encoding"]
separatorThe character used to separate elements in the statusline"β”‚"
mode.normalThe text shown in the mode element for normal mode"NOR"
mode.insertThe text shown in the mode element for insert mode"INS"
mode.selectThe text shown in the mode element for select mode"SEL"

The following statusline elements can be configured:

@@ -272,6 +276,7 @@ mode.select = "SELECT" modeThe current editor mode (mode.normal/mode.insert/mode.select) spinnerA progress spinner indicating LSP activity file-nameThe path/name of the opened file +file-absolute-pathThe absolute path/name of the opened file file-base-nameThe basename of the opened file file-modification-indicatorThe indicator to show whether the file is modified (a [+] appears when there are unsaved changes) file-encodingThe encoding of the opened file if it differs from UTF-8 @@ -285,7 +290,7 @@ mode.select = "SELECT" primary-selection-lengthThe number of characters currently in primary selection positionThe cursor position position-percentageThe cursor position as a percentage of the total number of lines -separatorThe string defined in editor.statusline.separator (defaults to "β”‚") +separatorThe string defined in editor.statusline.separator (defaults to "β”‚") spacerInserts a space between elements (multiple/contiguous spacers may be specified) version-controlThe current branch name or detached commit hash of the opened workspace registerThe current selected register @@ -326,17 +331,29 @@ change shape.

not visible in the Helix file picker and global search.

All git related options are only enabled in a git repository.

- - - - - - - - - + + + + + + + + +
KeyDescriptionDefault
hiddenEnables ignoring hidden filestrue
follow-symlinksFollow symlinks instead of ignoring themtrue
deduplicate-linksIgnore symlinks that point at files already shown in the pickertrue
parentsEnables reading ignore files from parent directoriestrue
ignoreEnables reading .ignore filestrue
git-ignoreEnables reading .gitignore filestrue
git-globalEnables reading global .gitignore, whose path is specified in git's config: core.excludefile optiontrue
git-excludeEnables reading .git/info/exclude filestrue
max-depthSet with an integer value for maximum depth to recurseDefaults to None.
hiddenEnables ignoring hidden filestrue
follow-symlinksFollow symlinks instead of ignoring themtrue
deduplicate-linksIgnore symlinks that point at files already shown in the pickertrue
parentsEnables reading ignore files from parent directoriestrue
ignoreEnables reading .ignore filestrue
git-ignoreEnables reading .gitignore filestrue
git-globalEnables reading global .gitignore, whose path is specified in git's config: core.excludesfile optiontrue
git-excludeEnables reading .git/info/exclude filestrue
max-depthSet with an integer value for maximum depth to recurseUnset by default
+

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.

+

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:

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

Example:

+
# unignore in file picker and global search
+!.github/
+!.gitignore
+!.gitattributes
+

[editor.auto-pairs] Section

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

@@ -344,28 +361,28 @@ simple boolean value, or a specific mapping of pairs of single characters.

[editor]
 auto-pairs = false # defaults to `true`
 
-

The default pairs are (){}[]''""``, but these can be customized by +

The default pairs are (){}[]''""``, but these can be customized by setting auto-pairs to a TOML table:

[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 ''

+

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

[[language]]
-name = "rust"
+name = "rust"
 
 [language.auto-pairs]
 '(' = ')'
 '{' = '}'
 '[' = ']'
-'"' = '"'
+'"' = '"'
 '`' = '`'
 '<' = '>'
 
@@ -379,25 +396,28 @@ name = "rust"

[editor.whitespace] Section

Options for rendering whitespace with visible characters. Use :set whitespace.render all to temporarily enable visible whitespace.

- - + +
KeyDescriptionDefault
renderWhether to render whitespace. May either be "all" or "none", or a table with sub-keys space, nbsp, tab, and newline"none"
charactersLiteral characters to use when rendering whitespace. Sub-keys may be any of tab, space, nbsp, newline or tabpadSee example below
renderWhether to render whitespace. May either be all or none, or a table with sub-keys space, nbsp, nnbsp, tab, and newlinenone
charactersLiteral characters to use when rendering whitespace. Sub-keys may be any of tab, space, nbsp, nnbsp, newline or tabpadSee example below

Example

[editor.whitespace]
-render = "all"
+render = "all"
 # or control each character
 [editor.whitespace.render]
-space = "all"
-tab = "all"
-newline = "none"
+space = "all"
+tab = "all"
+nbsp = "none"
+nnbsp = "none"
+newline = "none"
 
 [editor.whitespace.characters]
-space = "Β·"
-nbsp = "⍽"
-tab = "β†’"
-newline = "⏎"
-tabpad = "Β·" # Tabs will look like "β†’Β·Β·Β·" (depending on tab width)
+space = "Β·"
+nbsp = "⍽"
+nnbsp = "␣"
+tab = "β†’"
+newline = "⏎"
+tabpad = "Β·" # Tabs will look like "β†’Β·Β·Β·" (depending on tab width)
 

[editor.indent-guides] Section

Options for rendering vertical indent guides.

@@ -411,26 +431,26 @@ tabpad = "Β·" # Tabs will look like "β†’Β·Β·Β·" (depending o

Example:

[editor.indent-guides]
 render = true
-character = "β•Ž" # Some characters that work well: "▏", "┆", "β”Š", "βΈ½"
+character = "β•Ž" # Some characters that work well: "▏", "┆", "β”Š", "βΈ½"
 skip-levels = 1
-rainbow-option = "normal"
+rainbow-option = "normal"
 

[editor.gutters] Section

For simplicity, editor.gutters accepts an array of gutter types, which will use default settings for all gutter components.

[editor]
-gutters = ["diff", "diagnostics", "line-numbers", "spacer"]
+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 subsections.

- +
KeyDescriptionDefault
layoutA vector of gutters to display["diagnostics", "spacer", "line-numbers", "spacer", "diff"]
layoutA vector of gutters to display["diagnostics", "spacer", "line-numbers", "spacer", "diff"]

Example:

[editor.gutters]
-layout = ["diff", "diagnostics", "line-numbers", "spacer"]
+layout = ["diff", "diagnostics", "line-numbers", "spacer"]
 

[editor.gutters.line-numbers] Section

Options for the line number gutter

@@ -445,7 +465,10 @@ min-width = 1

[editor.gutters.diagnostics] Section

Currently unused

[editor.gutters.diff] Section

-

Currently unused

+

The diff gutter option displays colored bars indicating whether a git diff represents that a line was added, removed or changed. +These colors are controlled by the theme attributes diff.plus, diff.minus and diff.delta.

+

Other diff providers will eventually be supported by a future plugin system.

+

There are currently no options for this section.

[editor.gutters.spacer] Section

Currently unused

[editor.soft-wrap] Section

@@ -463,7 +486,26 @@ min-width = 1 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 +wrap-indicator = "" # set wrap-indicator to "" to hide it +
+

[editor.smart-tab] Section

+

Options for navigating and editing using tab key.

+
+ + +
KeyDescriptionDefault
enableIf 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
supersede-menuNormally, 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
+
+

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, consider setting extra keybindings:

+
[keys.normal]
+tab = "move_parent_node_end"
+S-tab = "move_parent_node_start"
+
+[keys.insert]
+S-tab = "move_parent_node_start"
+
+[keys.select]
+tab = "extend_parent_node_end"
+S-tab = "extend_parent_node_start"
 

[editor.explorer] Section

Sets explorer side width and style.

@@ -472,19 +514,13 @@ wrap-indicator = "" # set wrap-indicator to "" to hide it positionexplorer widget position, left or rightleft -

[editor.smart-tab] Section

-
- - -
KeyDescriptionDefault
enableIf 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
supersede-menuNormally, 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
-

[editor.digraphs] Section

By default, special characters can be input using the insert_digraphs command, bound to \ in normal mode. Custom digraphs can be added to the editor.digraphs section of the config.

[editor.digraphs]
-ka = "か"
-ku = { symbols = "く", description = "The japanese character Ku" }
-shrug = "Β―\\_(ツ)_/Β―"
+ka = "か"
+ku = { symbols = "く", description = "The japanese character Ku" }
+shrug = "Β―\\_(ツ)_/Β―"
 
-- cgit v1.2.3-70-g09d2