mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
Compare commits
17 Commits
d14731b4ca
...
567f4b66dd
Author | SHA1 | Date | |
---|---|---|---|
|
567f4b66dd | ||
|
30e34aaf15 | ||
|
5f72657efd | ||
|
addc88d8db | ||
|
eb66451bcd | ||
|
9c89498dfb | ||
|
e6edbcfb8c | ||
|
29a3eeeac1 | ||
|
c6a0c026d0 | ||
|
cbf407fbc3 | ||
|
d441a67761 | ||
|
2e91d8b984 | ||
|
4b77d8b6b8 | ||
|
ea740d35ac | ||
|
374df7cd2a | ||
|
7167796b79 | ||
|
96ecbe0e2c |
@ -283,7 +283,7 @@ to package the runtime into <code>/usr/lib/helix/runtime</code>. The rough steps
|
|||||||
script could follow are:</p>
|
script could follow are:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li><code>export HELIX_DEFAULT_RUNTIME=/usr/lib/helix/runtime</code></li>
|
<li><code>export HELIX_DEFAULT_RUNTIME=/usr/lib/helix/runtime</code></li>
|
||||||
<li><code>cargo build --profile opt --locked --path helix-term</code></li>
|
<li><code>cargo build --profile opt --locked</code></li>
|
||||||
<li><code>cp -r runtime $BUILD_DIR/usr/lib/helix/</code></li>
|
<li><code>cp -r runtime $BUILD_DIR/usr/lib/helix/</code></li>
|
||||||
<li><code>cp target/opt/hx $BUILD_DIR/usr/bin/hx</code></li>
|
<li><code>cp target/opt/hx $BUILD_DIR/usr/bin/hx</code></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
@ -205,8 +205,8 @@ hidden = false
|
|||||||
</code></pre>
|
</code></pre>
|
||||||
<p>You can use a custom configuration file by specifying it with the <code>-c</code> or
|
<p>You can use a custom configuration file by specifying it with the <code>-c</code> or
|
||||||
<code>--config</code> command line argument, for example <code>hx -c path/to/custom-config.toml</code>.
|
<code>--config</code> command line argument, for example <code>hx -c path/to/custom-config.toml</code>.
|
||||||
Additionally, you can reload the configuration file by sending the USR1
|
You can reload the config file by issuing the <code>:config-reload</code> command. Alternatively, on Unix operating systems, you can reload it by sending the USR1
|
||||||
signal to the Helix process on Unix operating systems, such as by using the command <code>pkill -USR1 hx</code>.</p>
|
signal to the Helix process, such as by using the command <code>pkill -USR1 hx</code>.</p>
|
||||||
<p>Finally, you can have a <code>config.toml</code> local to a project by putting it under a <code>.helix</code> directory in your repository.
|
<p>Finally, you can have a <code>config.toml</code> local to a project by putting it under a <code>.helix</code> directory in your repository.
|
||||||
Its settings will be merged with the configuration directory <code>config.toml</code> and the built-in configuration.</p>
|
Its settings will be merged with the configuration directory <code>config.toml</code> and the built-in configuration.</p>
|
||||||
|
|
||||||
|
@ -206,6 +206,7 @@
|
|||||||
<div class="table-wrapper"><table><thead><tr><th>Key</th><th>Description</th><th>Default</th></tr></thead><tbody>
|
<div class="table-wrapper"><table><thead><tr><th>Key</th><th>Description</th><th>Default</th></tr></thead><tbody>
|
||||||
<tr><td><code>scrolloff</code></td><td>Number of lines of padding around the edge of the screen when scrolling</td><td><code>5</code></td></tr>
|
<tr><td><code>scrolloff</code></td><td>Number of lines of padding around the edge of the screen when scrolling</td><td><code>5</code></td></tr>
|
||||||
<tr><td><code>mouse</code></td><td>Enable mouse mode</td><td><code>true</code></td></tr>
|
<tr><td><code>mouse</code></td><td>Enable mouse mode</td><td><code>true</code></td></tr>
|
||||||
|
<tr><td><code>default-yank-register</code></td><td>Default register used for yank/paste</td><td><code>"</code></td></tr>
|
||||||
<tr><td><code>middle-click-paste</code></td><td>Middle click paste support</td><td><code>true</code></td></tr>
|
<tr><td><code>middle-click-paste</code></td><td>Middle click paste support</td><td><code>true</code></td></tr>
|
||||||
<tr><td><code>scroll-lines</code></td><td>Number of lines to scroll per scroll wheel step</td><td><code>3</code></td></tr>
|
<tr><td><code>scroll-lines</code></td><td>Number of lines to scroll per scroll wheel step</td><td><code>3</code></td></tr>
|
||||||
<tr><td><code>shell</code></td><td>Shell to use when running external commands</td><td>Unix: <code>["sh", "-c"]</code><br/>Windows: <code>["cmd", "/C"]</code></td></tr>
|
<tr><td><code>shell</code></td><td>Shell to use when running external commands</td><td>Unix: <code>["sh", "-c"]</code><br/>Windows: <code>["cmd", "/C"]</code></td></tr>
|
||||||
@ -234,8 +235,24 @@
|
|||||||
<tr><td><code>indent-heuristic</code></td><td>How the indentation for a newly inserted line is computed: <code>simple</code> just copies the indentation level from the previous line, <code>tree-sitter</code> computes the indentation based on the syntax tree and <code>hybrid</code> combines both approaches. If the chosen heuristic is not available, a different one will be used as a fallback (the fallback order being <code>hybrid</code> -> <code>tree-sitter</code> -> <code>simple</code>).</td><td><code>hybrid</code></td></tr>
|
<tr><td><code>indent-heuristic</code></td><td>How the indentation for a newly inserted line is computed: <code>simple</code> just copies the indentation level from the previous line, <code>tree-sitter</code> computes the indentation based on the syntax tree and <code>hybrid</code> combines both approaches. If the chosen heuristic is not available, a different one will be used as a fallback (the fallback order being <code>hybrid</code> -> <code>tree-sitter</code> -> <code>simple</code>).</td><td><code>hybrid</code></td></tr>
|
||||||
<tr><td><code>jump-label-alphabet</code></td><td>The characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first.</td><td><code>"abcdefghijklmnopqrstuvwxyz"</code></td></tr>
|
<tr><td><code>jump-label-alphabet</code></td><td>The characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first.</td><td><code>"abcdefghijklmnopqrstuvwxyz"</code></td></tr>
|
||||||
<tr><td><code>end-of-line-diagnostics</code></td><td>Minimum severity of diagnostics to render at the end of the line. Set to <code>disable</code> to disable entirely. Refer to the setting about <code>inline-diagnostics</code> for more details</td><td>"disable"</td></tr>
|
<tr><td><code>end-of-line-diagnostics</code></td><td>Minimum severity of diagnostics to render at the end of the line. Set to <code>disable</code> to disable entirely. Refer to the setting about <code>inline-diagnostics</code> for more details</td><td>"disable"</td></tr>
|
||||||
|
<tr><td><code>clipboard-provider</code></td><td>Which API to use for clipboard interaction. One of <code>pasteboard</code> (MacOS), <code>wayland</code>, <code>x-clip</code>, <code>x-sel</code>, <code>win-32-yank</code>, <code>termux</code>, <code>tmux</code>, <code>windows</code>, <code>termcode</code>, <code>none</code>, or a custom command set.</td><td>Platform and environment specific.</td></tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
</div>
|
</div>
|
||||||
|
<h3 id="editorclipboard-provider-section"><a class="header" href="#editorclipboard-provider-section"><code>[editor.clipboard-provider]</code> Section</a></h3>
|
||||||
|
<p>Helix can be configured wither to use a builtin clipboard configuration or to use
|
||||||
|
a provided command.</p>
|
||||||
|
<p>For instance, setting it to use OSC 52 termcodes, the configuration would be:</p>
|
||||||
|
<pre><code class="language-toml">[editor]
|
||||||
|
clipboard-provider = "termcode"
|
||||||
|
</code></pre>
|
||||||
|
<p>Alternatively, Helix can be configured to use arbitary commands for clipboard integration:</p>
|
||||||
|
<pre><code class="language-toml">[editor.clipboard-provider.custom]
|
||||||
|
yank = { command = "cat", args = ["test.txt"] }
|
||||||
|
paste = { command = "tee", args = ["test.txt"] }
|
||||||
|
primary-yank = { command = "cat", args = ["test-primary.txt"] } # optional
|
||||||
|
primary-paste = { command = "tee", args = ["test-primary.txt"] } # optional
|
||||||
|
</code></pre>
|
||||||
|
<p>For custom commands the contents of the yank/paste is communicated over stdin/stdout.</p>
|
||||||
<h3 id="editorstatusline-section"><a class="header" href="#editorstatusline-section"><code>[editor.statusline]</code> Section</a></h3>
|
<h3 id="editorstatusline-section"><a class="header" href="#editorstatusline-section"><code>[editor.statusline]</code> Section</a></h3>
|
||||||
<p>Allows configuring the statusline at the bottom of the editor.</p>
|
<p>Allows configuring the statusline at the bottom of the editor.</p>
|
||||||
<p>The configuration distinguishes between three areas of the status line:</p>
|
<p>The configuration distinguishes between three areas of the status line:</p>
|
||||||
@ -526,7 +543,8 @@ S-tab = "extend_parent_node_start"
|
|||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>The new diagnostic rendering is not yet enabled by default. As soon as end of line or inline diagnostics are enabled the old diagnostics rendering is automatically disabled. The recommended default setting are:</p>
|
<p>The new diagnostic rendering is not yet enabled by default. As soon as end of line or inline diagnostics are enabled the old diagnostics rendering is automatically disabled. The recommended default setting are:</p>
|
||||||
<pre><code>end-of-line-diagnostics = "hint"
|
<pre><code class="language-toml">[editor]
|
||||||
|
end-of-line-diagnostics = "hint"
|
||||||
[editor.inline-diagnostics]
|
[editor.inline-diagnostics]
|
||||||
cursor-line = "warning" # show warnings and errors on the cursorline inline
|
cursor-line = "warning" # show warnings and errors on the cursorline inline
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -335,6 +335,7 @@
|
|||||||
<tr><td><code>Alt-p</code>, <code>Alt-left</code></td><td>Select previous sibling node in syntax tree (<strong>TS</strong>)</td><td><code>select_prev_sibling</code></td></tr>
|
<tr><td><code>Alt-p</code>, <code>Alt-left</code></td><td>Select previous sibling node in syntax tree (<strong>TS</strong>)</td><td><code>select_prev_sibling</code></td></tr>
|
||||||
<tr><td><code>Alt-n</code>, <code>Alt-right</code></td><td>Select next sibling node in syntax tree (<strong>TS</strong>)</td><td><code>select_next_sibling</code></td></tr>
|
<tr><td><code>Alt-n</code>, <code>Alt-right</code></td><td>Select next sibling node in syntax tree (<strong>TS</strong>)</td><td><code>select_next_sibling</code></td></tr>
|
||||||
<tr><td><code>Alt-a</code></td><td>Select all sibling nodes in syntax tree (<strong>TS</strong>)</td><td><code>select_all_siblings</code></td></tr>
|
<tr><td><code>Alt-a</code></td><td>Select all sibling nodes in syntax tree (<strong>TS</strong>)</td><td><code>select_all_siblings</code></td></tr>
|
||||||
|
<tr><td><code>Alt-I</code>, <code>Alt-Shift-down</code></td><td>Select all children nodes in syntax tree (<strong>TS</strong>)</td><td><code>select_all_children</code></td></tr>
|
||||||
<tr><td><code>Alt-e</code></td><td>Move to end of parent node in syntax tree (<strong>TS</strong>)</td><td><code>move_parent_node_end</code></td></tr>
|
<tr><td><code>Alt-e</code></td><td>Move to end of parent node in syntax tree (<strong>TS</strong>)</td><td><code>move_parent_node_end</code></td></tr>
|
||||||
<tr><td><code>Alt-b</code></td><td>Move to start of parent node in syntax tree (<strong>TS</strong>)</td><td><code>move_parent_node_start</code></td></tr>
|
<tr><td><code>Alt-b</code></td><td>Move to start of parent node in syntax tree (<strong>TS</strong>)</td><td><code>move_parent_node_start</code></td></tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
@ -448,7 +449,7 @@ useful when you're simply looking over text and not actively editing it.</p>
|
|||||||
<p>Accessed by typing <code>Space</code> in <a href="#normal-mode">normal mode</a>.</p>
|
<p>Accessed by typing <code>Space</code> in <a href="#normal-mode">normal mode</a>.</p>
|
||||||
<p>This layer is a kludge of mappings, mostly pickers.</p>
|
<p>This layer is a kludge of mappings, mostly pickers.</p>
|
||||||
<div class="table-wrapper"><table><thead><tr><th>Key</th><th>Description</th><th>Command</th></tr></thead><tbody>
|
<div class="table-wrapper"><table><thead><tr><th>Key</th><th>Description</th><th>Command</th></tr></thead><tbody>
|
||||||
<tr><td><code>f</code></td><td>Open file picker</td><td><code>file_picker</code></td></tr>
|
<tr><td><code>f</code></td><td>Open file picker at LSP workspace root</td><td><code>file_picker</code></td></tr>
|
||||||
<tr><td><code>F</code></td><td>Open file picker at current working directory</td><td><code>file_picker_in_current_directory</code></td></tr>
|
<tr><td><code>F</code></td><td>Open file picker at current working directory</td><td><code>file_picker_in_current_directory</code></td></tr>
|
||||||
<tr><td><code>b</code></td><td>Open buffer picker</td><td><code>buffer_picker</code></td></tr>
|
<tr><td><code>b</code></td><td>Open buffer picker</td><td><code>buffer_picker</code></td></tr>
|
||||||
<tr><td><code>j</code></td><td>Open jumplist picker</td><td><code>jumplist_picker</code></td></tr>
|
<tr><td><code>j</code></td><td>Open jumplist picker</td><td><code>jumplist_picker</code></td></tr>
|
||||||
|
@ -278,7 +278,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>hosts</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>hosts</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>html</td><td>✓</td><td></td><td></td><td><code>vscode-html-language-server</code>, <code>superhtml</code></td></tr>
|
<tr><td>html</td><td>✓</td><td></td><td></td><td><code>vscode-html-language-server</code>, <code>superhtml</code></td></tr>
|
||||||
<tr><td>hurl</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
<tr><td>hurl</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
||||||
<tr><td>hyprlang</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
<tr><td>hyprlang</td><td>✓</td><td></td><td>✓</td><td><code>hyprls</code></td></tr>
|
||||||
<tr><td>idris</td><td></td><td></td><td></td><td><code>idris2-lsp</code></td></tr>
|
<tr><td>idris</td><td></td><td></td><td></td><td><code>idris2-lsp</code></td></tr>
|
||||||
<tr><td>iex</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>iex</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>ini</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>ini</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
@ -323,6 +323,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>move</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>move</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>msbuild</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
<tr><td>msbuild</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
||||||
<tr><td>nasm</td><td>✓</td><td>✓</td><td></td><td></td></tr>
|
<tr><td>nasm</td><td>✓</td><td>✓</td><td></td><td></td></tr>
|
||||||
|
<tr><td>nestedtext</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
||||||
<tr><td>nickel</td><td>✓</td><td></td><td>✓</td><td><code>nls</code></td></tr>
|
<tr><td>nickel</td><td>✓</td><td></td><td>✓</td><td><code>nls</code></td></tr>
|
||||||
<tr><td>nim</td><td>✓</td><td>✓</td><td>✓</td><td><code>nimlangserver</code></td></tr>
|
<tr><td>nim</td><td>✓</td><td>✓</td><td>✓</td><td><code>nimlangserver</code></td></tr>
|
||||||
<tr><td>nix</td><td>✓</td><td>✓</td><td></td><td><code>nil</code>, <code>nixd</code></td></tr>
|
<tr><td>nix</td><td>✓</td><td>✓</td><td></td><td><code>nil</code>, <code>nixd</code></td></tr>
|
||||||
@ -355,6 +356,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>purescript</td><td>✓</td><td>✓</td><td></td><td><code>purescript-language-server</code></td></tr>
|
<tr><td>purescript</td><td>✓</td><td>✓</td><td></td><td><code>purescript-language-server</code></td></tr>
|
||||||
<tr><td>python</td><td>✓</td><td>✓</td><td>✓</td><td><code>ruff</code>, <code>jedi-language-server</code>, <code>pylsp</code></td></tr>
|
<tr><td>python</td><td>✓</td><td>✓</td><td>✓</td><td><code>ruff</code>, <code>jedi-language-server</code>, <code>pylsp</code></td></tr>
|
||||||
<tr><td>qml</td><td>✓</td><td></td><td>✓</td><td><code>qmlls</code></td></tr>
|
<tr><td>qml</td><td>✓</td><td></td><td>✓</td><td><code>qmlls</code></td></tr>
|
||||||
|
<tr><td>quint</td><td>✓</td><td></td><td></td><td><code>quint-language-server</code></td></tr>
|
||||||
<tr><td>r</td><td>✓</td><td></td><td></td><td><code>R</code></td></tr>
|
<tr><td>r</td><td>✓</td><td></td><td></td><td><code>R</code></td></tr>
|
||||||
<tr><td>racket</td><td>✓</td><td></td><td>✓</td><td><code>racket</code></td></tr>
|
<tr><td>racket</td><td>✓</td><td></td><td>✓</td><td><code>racket</code></td></tr>
|
||||||
<tr><td>regex</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>regex</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
@ -376,6 +378,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>sml</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>sml</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>snakemake</td><td>✓</td><td></td><td>✓</td><td><code>pylsp</code></td></tr>
|
<tr><td>snakemake</td><td>✓</td><td></td><td>✓</td><td><code>pylsp</code></td></tr>
|
||||||
<tr><td>solidity</td><td>✓</td><td>✓</td><td></td><td><code>solc</code></td></tr>
|
<tr><td>solidity</td><td>✓</td><td>✓</td><td></td><td><code>solc</code></td></tr>
|
||||||
|
<tr><td>spade</td><td>✓</td><td></td><td>✓</td><td><code>spade-language-server</code></td></tr>
|
||||||
<tr><td>spicedb</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>spicedb</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>sql</td><td>✓</td><td>✓</td><td></td><td></td></tr>
|
<tr><td>sql</td><td>✓</td><td>✓</td><td></td><td></td></tr>
|
||||||
<tr><td>sshclientconfig</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>sshclientconfig</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
@ -391,6 +394,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>task</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>task</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>tcl</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
<tr><td>tcl</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
||||||
<tr><td>templ</td><td>✓</td><td></td><td></td><td><code>templ</code></td></tr>
|
<tr><td>templ</td><td>✓</td><td></td><td></td><td><code>templ</code></td></tr>
|
||||||
|
<tr><td>textproto</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
||||||
<tr><td>tfvars</td><td>✓</td><td></td><td>✓</td><td><code>terraform-ls</code></td></tr>
|
<tr><td>tfvars</td><td>✓</td><td></td><td>✓</td><td><code>terraform-ls</code></td></tr>
|
||||||
<tr><td>thrift</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>thrift</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>todotxt</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>todotxt</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
@ -402,7 +406,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>typespec</td><td>✓</td><td>✓</td><td>✓</td><td><code>tsp-server</code></td></tr>
|
<tr><td>typespec</td><td>✓</td><td>✓</td><td>✓</td><td><code>tsp-server</code></td></tr>
|
||||||
<tr><td>typst</td><td>✓</td><td></td><td></td><td><code>tinymist</code>, <code>typst-lsp</code></td></tr>
|
<tr><td>typst</td><td>✓</td><td></td><td></td><td><code>tinymist</code>, <code>typst-lsp</code></td></tr>
|
||||||
<tr><td>ungrammar</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>ungrammar</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>unison</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
<tr><td>unison</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
||||||
<tr><td>uxntal</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>uxntal</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>v</td><td>✓</td><td>✓</td><td>✓</td><td><code>v-analyzer</code></td></tr>
|
<tr><td>v</td><td>✓</td><td>✓</td><td>✓</td><td><code>v-analyzer</code></td></tr>
|
||||||
<tr><td>vala</td><td>✓</td><td>✓</td><td></td><td><code>vala-language-server</code></td></tr>
|
<tr><td>vala</td><td>✓</td><td>✓</td><td></td><td><code>vala-language-server</code></td></tr>
|
||||||
|
@ -259,6 +259,11 @@ Download the official Helix AppImage from the <a href="https://github.com/helix-
|
|||||||
<pre><code class="language-sh">chmod +x helix-*.AppImage # change permission for executable mode
|
<pre><code class="language-sh">chmod +x helix-*.AppImage # change permission for executable mode
|
||||||
./helix-*.AppImage # run helix
|
./helix-*.AppImage # run helix
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
<p>You can optionally <a href="./building-from-source.html#configure-the-desktop-shortcut">add the <code>.desktop</code> file</a>. Helix must be installed in <code>PATH</code> with the name <code>hx</code>. For example:</p>
|
||||||
|
<pre><code class="language-sh">mkdir -p "$HOME/.local/bin"
|
||||||
|
mv helix-*.AppImage "$HOME/.local/bin/hx"
|
||||||
|
</code></pre>
|
||||||
|
<p>and make sure <code>~/.local/bin</code> is in your <code>PATH</code>.</p>
|
||||||
<h2 id="macos"><a class="header" href="#macos">macOS</a></h2>
|
<h2 id="macos"><a class="header" href="#macos">macOS</a></h2>
|
||||||
<h3 id="homebrew-core"><a class="header" href="#homebrew-core">Homebrew Core</a></h3>
|
<h3 id="homebrew-core"><a class="header" href="#homebrew-core">Homebrew Core</a></h3>
|
||||||
<pre><code class="language-sh">brew install helix
|
<pre><code class="language-sh">brew install helix
|
||||||
|
@ -289,6 +289,11 @@ Download the official Helix AppImage from the <a href="https://github.com/helix-
|
|||||||
<pre><code class="language-sh">chmod +x helix-*.AppImage # change permission for executable mode
|
<pre><code class="language-sh">chmod +x helix-*.AppImage # change permission for executable mode
|
||||||
./helix-*.AppImage # run helix
|
./helix-*.AppImage # run helix
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
<p>You can optionally <a href="./building-from-source.html#configure-the-desktop-shortcut">add the <code>.desktop</code> file</a>. Helix must be installed in <code>PATH</code> with the name <code>hx</code>. For example:</p>
|
||||||
|
<pre><code class="language-sh">mkdir -p "$HOME/.local/bin"
|
||||||
|
mv helix-*.AppImage "$HOME/.local/bin/hx"
|
||||||
|
</code></pre>
|
||||||
|
<p>and make sure <code>~/.local/bin</code> is in your <code>PATH</code>.</p>
|
||||||
<h2 id="macos"><a class="header" href="#macos">macOS</a></h2>
|
<h2 id="macos"><a class="header" href="#macos">macOS</a></h2>
|
||||||
<h3 id="homebrew-core"><a class="header" href="#homebrew-core">Homebrew Core</a></h3>
|
<h3 id="homebrew-core"><a class="header" href="#homebrew-core">Homebrew Core</a></h3>
|
||||||
<pre><code class="language-sh">brew install helix
|
<pre><code class="language-sh">brew install helix
|
||||||
@ -418,7 +423,7 @@ to package the runtime into <code>/usr/lib/helix/runtime</code>. The rough steps
|
|||||||
script could follow are:</p>
|
script could follow are:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li><code>export HELIX_DEFAULT_RUNTIME=/usr/lib/helix/runtime</code></li>
|
<li><code>export HELIX_DEFAULT_RUNTIME=/usr/lib/helix/runtime</code></li>
|
||||||
<li><code>cargo build --profile opt --locked --path helix-term</code></li>
|
<li><code>cargo build --profile opt --locked</code></li>
|
||||||
<li><code>cp -r runtime $BUILD_DIR/usr/lib/helix/</code></li>
|
<li><code>cp -r runtime $BUILD_DIR/usr/lib/helix/</code></li>
|
||||||
<li><code>cp target/opt/hx $BUILD_DIR/usr/bin/hx</code></li>
|
<li><code>cp target/opt/hx $BUILD_DIR/usr/bin/hx</code></li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -791,6 +796,7 @@ selection to the "func" <code>identifier</code>.</p>
|
|||||||
<tr><td><code>Alt-p</code>, <code>Alt-left</code></td><td>Select previous sibling node in syntax tree (<strong>TS</strong>)</td><td><code>select_prev_sibling</code></td></tr>
|
<tr><td><code>Alt-p</code>, <code>Alt-left</code></td><td>Select previous sibling node in syntax tree (<strong>TS</strong>)</td><td><code>select_prev_sibling</code></td></tr>
|
||||||
<tr><td><code>Alt-n</code>, <code>Alt-right</code></td><td>Select next sibling node in syntax tree (<strong>TS</strong>)</td><td><code>select_next_sibling</code></td></tr>
|
<tr><td><code>Alt-n</code>, <code>Alt-right</code></td><td>Select next sibling node in syntax tree (<strong>TS</strong>)</td><td><code>select_next_sibling</code></td></tr>
|
||||||
<tr><td><code>Alt-a</code></td><td>Select all sibling nodes in syntax tree (<strong>TS</strong>)</td><td><code>select_all_siblings</code></td></tr>
|
<tr><td><code>Alt-a</code></td><td>Select all sibling nodes in syntax tree (<strong>TS</strong>)</td><td><code>select_all_siblings</code></td></tr>
|
||||||
|
<tr><td><code>Alt-I</code>, <code>Alt-Shift-down</code></td><td>Select all children nodes in syntax tree (<strong>TS</strong>)</td><td><code>select_all_children</code></td></tr>
|
||||||
<tr><td><code>Alt-e</code></td><td>Move to end of parent node in syntax tree (<strong>TS</strong>)</td><td><code>move_parent_node_end</code></td></tr>
|
<tr><td><code>Alt-e</code></td><td>Move to end of parent node in syntax tree (<strong>TS</strong>)</td><td><code>move_parent_node_end</code></td></tr>
|
||||||
<tr><td><code>Alt-b</code></td><td>Move to start of parent node in syntax tree (<strong>TS</strong>)</td><td><code>move_parent_node_start</code></td></tr>
|
<tr><td><code>Alt-b</code></td><td>Move to start of parent node in syntax tree (<strong>TS</strong>)</td><td><code>move_parent_node_start</code></td></tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
@ -904,7 +910,7 @@ useful when you're simply looking over text and not actively editing it.</p>
|
|||||||
<p>Accessed by typing <code>Space</code> in <a href="keymap.html#normal-mode">normal mode</a>.</p>
|
<p>Accessed by typing <code>Space</code> in <a href="keymap.html#normal-mode">normal mode</a>.</p>
|
||||||
<p>This layer is a kludge of mappings, mostly pickers.</p>
|
<p>This layer is a kludge of mappings, mostly pickers.</p>
|
||||||
<div class="table-wrapper"><table><thead><tr><th>Key</th><th>Description</th><th>Command</th></tr></thead><tbody>
|
<div class="table-wrapper"><table><thead><tr><th>Key</th><th>Description</th><th>Command</th></tr></thead><tbody>
|
||||||
<tr><td><code>f</code></td><td>Open file picker</td><td><code>file_picker</code></td></tr>
|
<tr><td><code>f</code></td><td>Open file picker at LSP workspace root</td><td><code>file_picker</code></td></tr>
|
||||||
<tr><td><code>F</code></td><td>Open file picker at current working directory</td><td><code>file_picker_in_current_directory</code></td></tr>
|
<tr><td><code>F</code></td><td>Open file picker at current working directory</td><td><code>file_picker_in_current_directory</code></td></tr>
|
||||||
<tr><td><code>b</code></td><td>Open buffer picker</td><td><code>buffer_picker</code></td></tr>
|
<tr><td><code>b</code></td><td>Open buffer picker</td><td><code>buffer_picker</code></td></tr>
|
||||||
<tr><td><code>j</code></td><td>Open jumplist picker</td><td><code>jumplist_picker</code></td></tr>
|
<tr><td><code>j</code></td><td>Open jumplist picker</td><td><code>jumplist_picker</code></td></tr>
|
||||||
@ -1280,7 +1286,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>hosts</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>hosts</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>html</td><td>✓</td><td></td><td></td><td><code>vscode-html-language-server</code>, <code>superhtml</code></td></tr>
|
<tr><td>html</td><td>✓</td><td></td><td></td><td><code>vscode-html-language-server</code>, <code>superhtml</code></td></tr>
|
||||||
<tr><td>hurl</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
<tr><td>hurl</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
||||||
<tr><td>hyprlang</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
<tr><td>hyprlang</td><td>✓</td><td></td><td>✓</td><td><code>hyprls</code></td></tr>
|
||||||
<tr><td>idris</td><td></td><td></td><td></td><td><code>idris2-lsp</code></td></tr>
|
<tr><td>idris</td><td></td><td></td><td></td><td><code>idris2-lsp</code></td></tr>
|
||||||
<tr><td>iex</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>iex</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>ini</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>ini</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
@ -1325,6 +1331,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>move</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>move</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>msbuild</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
<tr><td>msbuild</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
||||||
<tr><td>nasm</td><td>✓</td><td>✓</td><td></td><td></td></tr>
|
<tr><td>nasm</td><td>✓</td><td>✓</td><td></td><td></td></tr>
|
||||||
|
<tr><td>nestedtext</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
||||||
<tr><td>nickel</td><td>✓</td><td></td><td>✓</td><td><code>nls</code></td></tr>
|
<tr><td>nickel</td><td>✓</td><td></td><td>✓</td><td><code>nls</code></td></tr>
|
||||||
<tr><td>nim</td><td>✓</td><td>✓</td><td>✓</td><td><code>nimlangserver</code></td></tr>
|
<tr><td>nim</td><td>✓</td><td>✓</td><td>✓</td><td><code>nimlangserver</code></td></tr>
|
||||||
<tr><td>nix</td><td>✓</td><td>✓</td><td></td><td><code>nil</code>, <code>nixd</code></td></tr>
|
<tr><td>nix</td><td>✓</td><td>✓</td><td></td><td><code>nil</code>, <code>nixd</code></td></tr>
|
||||||
@ -1357,6 +1364,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>purescript</td><td>✓</td><td>✓</td><td></td><td><code>purescript-language-server</code></td></tr>
|
<tr><td>purescript</td><td>✓</td><td>✓</td><td></td><td><code>purescript-language-server</code></td></tr>
|
||||||
<tr><td>python</td><td>✓</td><td>✓</td><td>✓</td><td><code>ruff</code>, <code>jedi-language-server</code>, <code>pylsp</code></td></tr>
|
<tr><td>python</td><td>✓</td><td>✓</td><td>✓</td><td><code>ruff</code>, <code>jedi-language-server</code>, <code>pylsp</code></td></tr>
|
||||||
<tr><td>qml</td><td>✓</td><td></td><td>✓</td><td><code>qmlls</code></td></tr>
|
<tr><td>qml</td><td>✓</td><td></td><td>✓</td><td><code>qmlls</code></td></tr>
|
||||||
|
<tr><td>quint</td><td>✓</td><td></td><td></td><td><code>quint-language-server</code></td></tr>
|
||||||
<tr><td>r</td><td>✓</td><td></td><td></td><td><code>R</code></td></tr>
|
<tr><td>r</td><td>✓</td><td></td><td></td><td><code>R</code></td></tr>
|
||||||
<tr><td>racket</td><td>✓</td><td></td><td>✓</td><td><code>racket</code></td></tr>
|
<tr><td>racket</td><td>✓</td><td></td><td>✓</td><td><code>racket</code></td></tr>
|
||||||
<tr><td>regex</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>regex</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
@ -1378,6 +1386,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>sml</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>sml</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>snakemake</td><td>✓</td><td></td><td>✓</td><td><code>pylsp</code></td></tr>
|
<tr><td>snakemake</td><td>✓</td><td></td><td>✓</td><td><code>pylsp</code></td></tr>
|
||||||
<tr><td>solidity</td><td>✓</td><td>✓</td><td></td><td><code>solc</code></td></tr>
|
<tr><td>solidity</td><td>✓</td><td>✓</td><td></td><td><code>solc</code></td></tr>
|
||||||
|
<tr><td>spade</td><td>✓</td><td></td><td>✓</td><td><code>spade-language-server</code></td></tr>
|
||||||
<tr><td>spicedb</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>spicedb</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>sql</td><td>✓</td><td>✓</td><td></td><td></td></tr>
|
<tr><td>sql</td><td>✓</td><td>✓</td><td></td><td></td></tr>
|
||||||
<tr><td>sshclientconfig</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>sshclientconfig</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
@ -1393,6 +1402,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>task</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>task</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>tcl</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
<tr><td>tcl</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
||||||
<tr><td>templ</td><td>✓</td><td></td><td></td><td><code>templ</code></td></tr>
|
<tr><td>templ</td><td>✓</td><td></td><td></td><td><code>templ</code></td></tr>
|
||||||
|
<tr><td>textproto</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
||||||
<tr><td>tfvars</td><td>✓</td><td></td><td>✓</td><td><code>terraform-ls</code></td></tr>
|
<tr><td>tfvars</td><td>✓</td><td></td><td>✓</td><td><code>terraform-ls</code></td></tr>
|
||||||
<tr><td>thrift</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>thrift</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>todotxt</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>todotxt</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
@ -1404,7 +1414,7 @@ Languages</a> guide for more language configuration information.</p>
|
|||||||
<tr><td>typespec</td><td>✓</td><td>✓</td><td>✓</td><td><code>tsp-server</code></td></tr>
|
<tr><td>typespec</td><td>✓</td><td>✓</td><td>✓</td><td><code>tsp-server</code></td></tr>
|
||||||
<tr><td>typst</td><td>✓</td><td></td><td></td><td><code>tinymist</code>, <code>typst-lsp</code></td></tr>
|
<tr><td>typst</td><td>✓</td><td></td><td></td><td><code>tinymist</code>, <code>typst-lsp</code></td></tr>
|
||||||
<tr><td>ungrammar</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>ungrammar</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>unison</td><td>✓</td><td></td><td>✓</td><td></td></tr>
|
<tr><td>unison</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr>
|
||||||
<tr><td>uxntal</td><td>✓</td><td></td><td></td><td></td></tr>
|
<tr><td>uxntal</td><td>✓</td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>v</td><td>✓</td><td>✓</td><td>✓</td><td><code>v-analyzer</code></td></tr>
|
<tr><td>v</td><td>✓</td><td>✓</td><td>✓</td><td><code>v-analyzer</code></td></tr>
|
||||||
<tr><td>vala</td><td>✓</td><td>✓</td><td></td><td><code>vala-language-server</code></td></tr>
|
<tr><td>vala</td><td>✓</td><td>✓</td><td></td><td><code>vala-language-server</code></td></tr>
|
||||||
@ -1462,8 +1472,8 @@ hidden = false
|
|||||||
</code></pre>
|
</code></pre>
|
||||||
<p>You can use a custom configuration file by specifying it with the <code>-c</code> or
|
<p>You can use a custom configuration file by specifying it with the <code>-c</code> or
|
||||||
<code>--config</code> command line argument, for example <code>hx -c path/to/custom-config.toml</code>.
|
<code>--config</code> command line argument, for example <code>hx -c path/to/custom-config.toml</code>.
|
||||||
Additionally, you can reload the configuration file by sending the USR1
|
You can reload the config file by issuing the <code>:config-reload</code> command. Alternatively, on Unix operating systems, you can reload it by sending the USR1
|
||||||
signal to the Helix process on Unix operating systems, such as by using the command <code>pkill -USR1 hx</code>.</p>
|
signal to the Helix process, such as by using the command <code>pkill -USR1 hx</code>.</p>
|
||||||
<p>Finally, you can have a <code>config.toml</code> local to a project by putting it under a <code>.helix</code> directory in your repository.
|
<p>Finally, you can have a <code>config.toml</code> local to a project by putting it under a <code>.helix</code> directory in your repository.
|
||||||
Its settings will be merged with the configuration directory <code>config.toml</code> and the built-in configuration.</p>
|
Its settings will be merged with the configuration directory <code>config.toml</code> and the built-in configuration.</p>
|
||||||
<div style="break-before: page; page-break-before: always;"></div><h2 id="editor"><a class="header" href="#editor">Editor</a></h2>
|
<div style="break-before: page; page-break-before: always;"></div><h2 id="editor"><a class="header" href="#editor">Editor</a></h2>
|
||||||
@ -1493,6 +1503,7 @@ Its settings will be merged with the configuration directory <code>config.toml</
|
|||||||
<div class="table-wrapper"><table><thead><tr><th>Key</th><th>Description</th><th>Default</th></tr></thead><tbody>
|
<div class="table-wrapper"><table><thead><tr><th>Key</th><th>Description</th><th>Default</th></tr></thead><tbody>
|
||||||
<tr><td><code>scrolloff</code></td><td>Number of lines of padding around the edge of the screen when scrolling</td><td><code>5</code></td></tr>
|
<tr><td><code>scrolloff</code></td><td>Number of lines of padding around the edge of the screen when scrolling</td><td><code>5</code></td></tr>
|
||||||
<tr><td><code>mouse</code></td><td>Enable mouse mode</td><td><code>true</code></td></tr>
|
<tr><td><code>mouse</code></td><td>Enable mouse mode</td><td><code>true</code></td></tr>
|
||||||
|
<tr><td><code>default-yank-register</code></td><td>Default register used for yank/paste</td><td><code>"</code></td></tr>
|
||||||
<tr><td><code>middle-click-paste</code></td><td>Middle click paste support</td><td><code>true</code></td></tr>
|
<tr><td><code>middle-click-paste</code></td><td>Middle click paste support</td><td><code>true</code></td></tr>
|
||||||
<tr><td><code>scroll-lines</code></td><td>Number of lines to scroll per scroll wheel step</td><td><code>3</code></td></tr>
|
<tr><td><code>scroll-lines</code></td><td>Number of lines to scroll per scroll wheel step</td><td><code>3</code></td></tr>
|
||||||
<tr><td><code>shell</code></td><td>Shell to use when running external commands</td><td>Unix: <code>["sh", "-c"]</code><br/>Windows: <code>["cmd", "/C"]</code></td></tr>
|
<tr><td><code>shell</code></td><td>Shell to use when running external commands</td><td>Unix: <code>["sh", "-c"]</code><br/>Windows: <code>["cmd", "/C"]</code></td></tr>
|
||||||
@ -1521,8 +1532,24 @@ Its settings will be merged with the configuration directory <code>config.toml</
|
|||||||
<tr><td><code>indent-heuristic</code></td><td>How the indentation for a newly inserted line is computed: <code>simple</code> just copies the indentation level from the previous line, <code>tree-sitter</code> computes the indentation based on the syntax tree and <code>hybrid</code> combines both approaches. If the chosen heuristic is not available, a different one will be used as a fallback (the fallback order being <code>hybrid</code> -> <code>tree-sitter</code> -> <code>simple</code>).</td><td><code>hybrid</code></td></tr>
|
<tr><td><code>indent-heuristic</code></td><td>How the indentation for a newly inserted line is computed: <code>simple</code> just copies the indentation level from the previous line, <code>tree-sitter</code> computes the indentation based on the syntax tree and <code>hybrid</code> combines both approaches. If the chosen heuristic is not available, a different one will be used as a fallback (the fallback order being <code>hybrid</code> -> <code>tree-sitter</code> -> <code>simple</code>).</td><td><code>hybrid</code></td></tr>
|
||||||
<tr><td><code>jump-label-alphabet</code></td><td>The characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first.</td><td><code>"abcdefghijklmnopqrstuvwxyz"</code></td></tr>
|
<tr><td><code>jump-label-alphabet</code></td><td>The characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first.</td><td><code>"abcdefghijklmnopqrstuvwxyz"</code></td></tr>
|
||||||
<tr><td><code>end-of-line-diagnostics</code></td><td>Minimum severity of diagnostics to render at the end of the line. Set to <code>disable</code> to disable entirely. Refer to the setting about <code>inline-diagnostics</code> for more details</td><td>"disable"</td></tr>
|
<tr><td><code>end-of-line-diagnostics</code></td><td>Minimum severity of diagnostics to render at the end of the line. Set to <code>disable</code> to disable entirely. Refer to the setting about <code>inline-diagnostics</code> for more details</td><td>"disable"</td></tr>
|
||||||
|
<tr><td><code>clipboard-provider</code></td><td>Which API to use for clipboard interaction. One of <code>pasteboard</code> (MacOS), <code>wayland</code>, <code>x-clip</code>, <code>x-sel</code>, <code>win-32-yank</code>, <code>termux</code>, <code>tmux</code>, <code>windows</code>, <code>termcode</code>, <code>none</code>, or a custom command set.</td><td>Platform and environment specific.</td></tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
</div>
|
</div>
|
||||||
|
<h3 id="editorclipboard-provider-section"><a class="header" href="#editorclipboard-provider-section"><code>[editor.clipboard-provider]</code> Section</a></h3>
|
||||||
|
<p>Helix can be configured wither to use a builtin clipboard configuration or to use
|
||||||
|
a provided command.</p>
|
||||||
|
<p>For instance, setting it to use OSC 52 termcodes, the configuration would be:</p>
|
||||||
|
<pre><code class="language-toml">[editor]
|
||||||
|
clipboard-provider = "termcode"
|
||||||
|
</code></pre>
|
||||||
|
<p>Alternatively, Helix can be configured to use arbitary commands for clipboard integration:</p>
|
||||||
|
<pre><code class="language-toml">[editor.clipboard-provider.custom]
|
||||||
|
yank = { command = "cat", args = ["test.txt"] }
|
||||||
|
paste = { command = "tee", args = ["test.txt"] }
|
||||||
|
primary-yank = { command = "cat", args = ["test-primary.txt"] } # optional
|
||||||
|
primary-paste = { command = "tee", args = ["test-primary.txt"] } # optional
|
||||||
|
</code></pre>
|
||||||
|
<p>For custom commands the contents of the yank/paste is communicated over stdin/stdout.</p>
|
||||||
<h3 id="editorstatusline-section"><a class="header" href="#editorstatusline-section"><code>[editor.statusline]</code> Section</a></h3>
|
<h3 id="editorstatusline-section"><a class="header" href="#editorstatusline-section"><code>[editor.statusline]</code> Section</a></h3>
|
||||||
<p>Allows configuring the statusline at the bottom of the editor.</p>
|
<p>Allows configuring the statusline at the bottom of the editor.</p>
|
||||||
<p>The configuration distinguishes between three areas of the status line:</p>
|
<p>The configuration distinguishes between three areas of the status line:</p>
|
||||||
@ -1813,7 +1840,8 @@ S-tab = "extend_parent_node_start"
|
|||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>The new diagnostic rendering is not yet enabled by default. As soon as end of line or inline diagnostics are enabled the old diagnostics rendering is automatically disabled. The recommended default setting are:</p>
|
<p>The new diagnostic rendering is not yet enabled by default. As soon as end of line or inline diagnostics are enabled the old diagnostics rendering is automatically disabled. The recommended default setting are:</p>
|
||||||
<pre><code>end-of-line-diagnostics = "hint"
|
<pre><code class="language-toml">[editor]
|
||||||
|
end-of-line-diagnostics = "hint"
|
||||||
[editor.inline-diagnostics]
|
[editor.inline-diagnostics]
|
||||||
cursor-line = "warning" # show warnings and errors on the cursorline inline
|
cursor-line = "warning" # show warnings and errors on the cursorline inline
|
||||||
</code></pre>
|
</code></pre>
|
||||||
@ -2230,9 +2258,31 @@ berry = "#2A2A4D"
|
|||||||
<p>Helix currently supports one-way key remapping through a simple TOML configuration
|
<p>Helix currently supports one-way key remapping through a simple TOML configuration
|
||||||
file. (More powerful solutions such as rebinding via commands will be
|
file. (More powerful solutions such as rebinding via commands will be
|
||||||
available in the future).</p>
|
available in the future).</p>
|
||||||
|
<p>There are three kinds of commands that can be used in keymaps:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Static commands: commands like <code>move_char_right</code> which are usually bound to
|
||||||
|
keys and used for movement and editing. A list of static commands is
|
||||||
|
available in the <a href="./keymap.html">Keymap</a> documentation and in the source code
|
||||||
|
in <a href="https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs"><code>helix-term/src/commands.rs</code></a>
|
||||||
|
at the invocation of <code>static_commands!</code> macro.</li>
|
||||||
|
<li>Typable commands: commands that can be executed from command mode (<code>:</code>), for
|
||||||
|
example <code>:write!</code>. See the <a href="./commands.html">Commands</a> documentation for a
|
||||||
|
list of available typeable commands or the <code>TypableCommandList</code> declaration in
|
||||||
|
the source code at <a href="https://github.com/helix-editor/helix/blob/master/helix-term/src/commands/typed.rs"><code>helix-term/src/commands/typed.rs</code></a>.</li>
|
||||||
|
<li>Macros: sequences of keys that are executed in order. These keybindings
|
||||||
|
start with <code>@</code> and then list any number of keys to be executed. For example
|
||||||
|
<code>@miw</code> can be used to select the surrounding word. For now, macro keybindings
|
||||||
|
are not allowed in keybinding sequences due to limitations in the way that
|
||||||
|
command sequences are executed. Modifier keys (e.g. Alt+o) can be used
|
||||||
|
like <code>"<A-o>"</code>, e.g. <code>"@miw<A-o>"</code></li>
|
||||||
|
</ul>
|
||||||
<p>To remap keys, create a <code>config.toml</code> file in your <code>helix</code> configuration
|
<p>To remap keys, create a <code>config.toml</code> file in your <code>helix</code> configuration
|
||||||
directory (default <code>~/.config/helix</code> on Linux systems) with a structure like
|
directory (default <code>~/.config/helix</code> on Linux systems) with a structure like
|
||||||
this:</p>
|
this:</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>💡 To set a modifier + key as a keymap, type <code>A-X = ...</code> or <code>C-X = ...</code> for Alt + X or Ctrl + X. Combine with Shift using a dash, e.g. <code>C-S-esc</code>.
|
||||||
|
Within macros, wrap them in <code><></code>, e.g. <code><A-X></code> and <code><C-X></code> to distinguish from the <code>A</code> or <code>C</code> keys.</p>
|
||||||
|
</blockquote>
|
||||||
<pre><code class="language-toml"># At most one section each of 'keys.normal', 'keys.insert' and 'keys.select'
|
<pre><code class="language-toml"># At most one section each of 'keys.normal', 'keys.insert' and 'keys.select'
|
||||||
[keys.normal]
|
[keys.normal]
|
||||||
C-s = ":w" # Maps Ctrl-s to the typable command :w which is an alias for :write (save file)
|
C-s = ":w" # Maps Ctrl-s to the typable command :w which is an alias for :write (save file)
|
||||||
@ -2242,6 +2292,7 @@ w = "move_line_up" # Maps the 'w' key move_line_up
|
|||||||
"C-S-esc" = "extend_line" # Maps Ctrl-Shift-Escape to extend_line
|
"C-S-esc" = "extend_line" # Maps Ctrl-Shift-Escape to extend_line
|
||||||
g = { a = "code_action" } # Maps `ga` to show possible code actions
|
g = { a = "code_action" } # Maps `ga` to show possible code actions
|
||||||
"ret" = ["open_below", "normal_mode"] # Maps the enter key to open_below then re-enter normal mode
|
"ret" = ["open_below", "normal_mode"] # Maps the enter key to open_below then re-enter normal mode
|
||||||
|
"A-x" = "@x<A-d>" # Maps Alt-x to a macro selecting the whole line and deleting it without yanking it
|
||||||
|
|
||||||
[keys.insert]
|
[keys.insert]
|
||||||
"A-x" = "normal_mode" # Maps Alt-X to enter normal mode
|
"A-x" = "normal_mode" # Maps Alt-X to enter normal mode
|
||||||
@ -2291,23 +2342,6 @@ t = ":run-shell-command cargo test"
|
|||||||
</tbody></table>
|
</tbody></table>
|
||||||
</div>
|
</div>
|
||||||
<p>Keys can be disabled by binding them to the <code>no_op</code> command.</p>
|
<p>Keys can be disabled by binding them to the <code>no_op</code> command.</p>
|
||||||
<h2 id="commands-1"><a class="header" href="#commands-1">Commands</a></h2>
|
|
||||||
<p>There are three kinds of commands that can be used in keymaps:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Static commands: commands like <code>move_char_right</code> which are usually bound to
|
|
||||||
keys and used for movement and editing. A list of static commands is
|
|
||||||
available in the <a href="./keymap.html">Keymap</a> documentation and in the source code
|
|
||||||
in <a href="https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs"><code>helix-term/src/commands.rs</code></a>
|
|
||||||
at the invocation of <code>static_commands!</code> macro and the <code>TypableCommandList</code>.</li>
|
|
||||||
<li>Typable commands: commands that can be executed from command mode (<code>:</code>), for
|
|
||||||
example <code>:write!</code>. See the <a href="./commands.html">Commands</a> documentation for a
|
|
||||||
list of available typeable commands.</li>
|
|
||||||
<li>Macros: sequences of keys that are executed in order. These keybindings
|
|
||||||
start with <code>@</code> and then list any number of keys to be executed. For example
|
|
||||||
<code>@miw</code> can be used to select the surrounding word. For now, macro keybindings
|
|
||||||
are not allowed in keybinding sequences due to limitations in the way that
|
|
||||||
command sequences are executed.</li>
|
|
||||||
</ul>
|
|
||||||
<div style="break-before: page; page-break-before: always;"></div><h2 id="languages"><a class="header" href="#languages">Languages</a></h2>
|
<div style="break-before: page; page-break-before: always;"></div><h2 id="languages"><a class="header" href="#languages">Languages</a></h2>
|
||||||
<p>Language-specific settings and settings for language servers are configured
|
<p>Language-specific settings and settings for language servers are configured
|
||||||
in <code>languages.toml</code> files.</p>
|
in <code>languages.toml</code> files.</p>
|
||||||
|
@ -183,9 +183,31 @@
|
|||||||
<p>Helix currently supports one-way key remapping through a simple TOML configuration
|
<p>Helix currently supports one-way key remapping through a simple TOML configuration
|
||||||
file. (More powerful solutions such as rebinding via commands will be
|
file. (More powerful solutions such as rebinding via commands will be
|
||||||
available in the future).</p>
|
available in the future).</p>
|
||||||
|
<p>There are three kinds of commands that can be used in keymaps:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Static commands: commands like <code>move_char_right</code> which are usually bound to
|
||||||
|
keys and used for movement and editing. A list of static commands is
|
||||||
|
available in the <a href="./keymap.html">Keymap</a> documentation and in the source code
|
||||||
|
in <a href="https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs"><code>helix-term/src/commands.rs</code></a>
|
||||||
|
at the invocation of <code>static_commands!</code> macro.</li>
|
||||||
|
<li>Typable commands: commands that can be executed from command mode (<code>:</code>), for
|
||||||
|
example <code>:write!</code>. See the <a href="./commands.html">Commands</a> documentation for a
|
||||||
|
list of available typeable commands or the <code>TypableCommandList</code> declaration in
|
||||||
|
the source code at <a href="https://github.com/helix-editor/helix/blob/master/helix-term/src/commands/typed.rs"><code>helix-term/src/commands/typed.rs</code></a>.</li>
|
||||||
|
<li>Macros: sequences of keys that are executed in order. These keybindings
|
||||||
|
start with <code>@</code> and then list any number of keys to be executed. For example
|
||||||
|
<code>@miw</code> can be used to select the surrounding word. For now, macro keybindings
|
||||||
|
are not allowed in keybinding sequences due to limitations in the way that
|
||||||
|
command sequences are executed. Modifier keys (e.g. Alt+o) can be used
|
||||||
|
like <code>"<A-o>"</code>, e.g. <code>"@miw<A-o>"</code></li>
|
||||||
|
</ul>
|
||||||
<p>To remap keys, create a <code>config.toml</code> file in your <code>helix</code> configuration
|
<p>To remap keys, create a <code>config.toml</code> file in your <code>helix</code> configuration
|
||||||
directory (default <code>~/.config/helix</code> on Linux systems) with a structure like
|
directory (default <code>~/.config/helix</code> on Linux systems) with a structure like
|
||||||
this:</p>
|
this:</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>💡 To set a modifier + key as a keymap, type <code>A-X = ...</code> or <code>C-X = ...</code> for Alt + X or Ctrl + X. Combine with Shift using a dash, e.g. <code>C-S-esc</code>.
|
||||||
|
Within macros, wrap them in <code><></code>, e.g. <code><A-X></code> and <code><C-X></code> to distinguish from the <code>A</code> or <code>C</code> keys.</p>
|
||||||
|
</blockquote>
|
||||||
<pre><code class="language-toml"># At most one section each of 'keys.normal', 'keys.insert' and 'keys.select'
|
<pre><code class="language-toml"># At most one section each of 'keys.normal', 'keys.insert' and 'keys.select'
|
||||||
[keys.normal]
|
[keys.normal]
|
||||||
C-s = ":w" # Maps Ctrl-s to the typable command :w which is an alias for :write (save file)
|
C-s = ":w" # Maps Ctrl-s to the typable command :w which is an alias for :write (save file)
|
||||||
@ -195,6 +217,7 @@ w = "move_line_up" # Maps the 'w' key move_line_up
|
|||||||
"C-S-esc" = "extend_line" # Maps Ctrl-Shift-Escape to extend_line
|
"C-S-esc" = "extend_line" # Maps Ctrl-Shift-Escape to extend_line
|
||||||
g = { a = "code_action" } # Maps `ga` to show possible code actions
|
g = { a = "code_action" } # Maps `ga` to show possible code actions
|
||||||
"ret" = ["open_below", "normal_mode"] # Maps the enter key to open_below then re-enter normal mode
|
"ret" = ["open_below", "normal_mode"] # Maps the enter key to open_below then re-enter normal mode
|
||||||
|
"A-x" = "@x<A-d>" # Maps Alt-x to a macro selecting the whole line and deleting it without yanking it
|
||||||
|
|
||||||
[keys.insert]
|
[keys.insert]
|
||||||
"A-x" = "normal_mode" # Maps Alt-X to enter normal mode
|
"A-x" = "normal_mode" # Maps Alt-X to enter normal mode
|
||||||
@ -244,23 +267,6 @@ t = ":run-shell-command cargo test"
|
|||||||
</tbody></table>
|
</tbody></table>
|
||||||
</div>
|
</div>
|
||||||
<p>Keys can be disabled by binding them to the <code>no_op</code> command.</p>
|
<p>Keys can be disabled by binding them to the <code>no_op</code> command.</p>
|
||||||
<h2 id="commands"><a class="header" href="#commands">Commands</a></h2>
|
|
||||||
<p>There are three kinds of commands that can be used in keymaps:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Static commands: commands like <code>move_char_right</code> which are usually bound to
|
|
||||||
keys and used for movement and editing. A list of static commands is
|
|
||||||
available in the <a href="./keymap.html">Keymap</a> documentation and in the source code
|
|
||||||
in <a href="https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs"><code>helix-term/src/commands.rs</code></a>
|
|
||||||
at the invocation of <code>static_commands!</code> macro and the <code>TypableCommandList</code>.</li>
|
|
||||||
<li>Typable commands: commands that can be executed from command mode (<code>:</code>), for
|
|
||||||
example <code>:write!</code>. See the <a href="./commands.html">Commands</a> documentation for a
|
|
||||||
list of available typeable commands.</li>
|
|
||||||
<li>Macros: sequences of keys that are executed in order. These keybindings
|
|
||||||
start with <code>@</code> and then list any number of keys to be executed. For example
|
|
||||||
<code>@miw</code> can be used to select the surrounding word. For now, macro keybindings
|
|
||||||
are not allowed in keybinding sequences due to limitations in the way that
|
|
||||||
command sequences are executed.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user