gh-pages
archseer 1 year ago
parent b667e964a8
commit 6326a4d2ca

@ -278,7 +278,7 @@ You can get <a href="https://www.microsoft.com/p/app-installer/9nblggh4nns1#acti
<ul> <ul>
<li>The <a href="https://www.rust-lang.org/tools/install">Rust toolchain</a></li> <li>The <a href="https://www.rust-lang.org/tools/install">Rust toolchain</a></li>
<li>The <a href="https://git-scm.com/">Git version control system</a></li> <li>The <a href="https://git-scm.com/">Git version control system</a></li>
<li>A c++14 compatible compiler to build the tree-sitter grammars, for example GCC or Clang</li> <li>A C++14 compatible compiler to build the tree-sitter grammars, for example GCC or Clang</li>
</ul> </ul>
<p>If you are using the <code>musl-libc</code> standard library instead of <code>glibc</code> the following environment variable must be set during the build to ensure tree-sitter grammars can be loaded correctly:</p> <p>If you are using the <code>musl-libc</code> standard library instead of <code>glibc</code> the following environment variable must be set during the build to ensure tree-sitter grammars can be loaded correctly:</p>
<pre><code class="language-sh">RUSTFLAGS=&quot;-C target-feature=-crt-static&quot; <pre><code class="language-sh">RUSTFLAGS=&quot;-C target-feature=-crt-static&quot;

@ -519,7 +519,7 @@ end = &quot;no_op&quot;
<h2 id="select--extend-mode"><a class="header" href="#select--extend-mode">Select / extend mode</a></h2> <h2 id="select--extend-mode"><a class="header" href="#select--extend-mode">Select / extend mode</a></h2>
<p>Select mode echoes Normal mode, but changes any movements to extend <p>Select mode echoes Normal mode, but changes any movements to extend
selections rather than replace them. Goto motions are also changed to selections rather than replace them. Goto motions are also changed to
extend, so that <code>vgl</code> for example extends the selection to the end of extend, so that <code>vgl</code>, for example, extends the selection to the end of
the line.</p> the line.</p>
<p>Search is also affected. By default, <code>n</code> and <code>N</code> will remove the current <p>Search is also affected. By default, <code>n</code> and <code>N</code> will remove the current
selection and select the next instance of the search term. Toggling this selection and select the next instance of the search term. Toggling this

@ -154,16 +154,14 @@ in <code>languages.toml</code> files.</p>
<p>There are three possible locations for a <code>languages.toml</code> file:</p> <p>There are three possible locations for a <code>languages.toml</code> file:</p>
<ol> <ol>
<li> <li>
<p>In the Helix source code, this lives in the <p>In the Helix source code, which lives in the
<a href="https://github.com/helix-editor/helix/blob/master/languages.toml">Helix repository</a>. <a href="https://github.com/helix-editor/helix/blob/master/languages.toml">Helix repository</a>.
It provides the default configurations for languages and language servers.</p> It provides the default configurations for languages and language servers.</p>
</li> </li>
<li> <li>
<p>In your <a href="./configuration.html">configuration directory</a>. This overrides values <p>In your <a href="./configuration.html">configuration directory</a>. This overrides values
from the built-in language configuration. For example to disable from the built-in language configuration. For example, to disable
auto-LSP-formatting in Rust:</p> auto-LSP-formatting in Rust:</p>
</li>
</ol>
<pre><code class="language-toml"># in &lt;config_dir&gt;/helix/languages.toml <pre><code class="language-toml"># in &lt;config_dir&gt;/helix/languages.toml
[language-server.mylang-lsp] [language-server.mylang-lsp]
@ -173,11 +171,13 @@ command = &quot;mylang-lsp&quot;
name = &quot;rust&quot; name = &quot;rust&quot;
auto-format = false auto-format = false
</code></pre> </code></pre>
<ol start="3"> </li>
<li>In a <code>.helix</code> folder in your project. Language configuration may also be <li>
<p>In a <code>.helix</code> folder in your project. Language configuration may also be
overridden local to a project by creating a <code>languages.toml</code> file in a overridden local to a project by creating a <code>languages.toml</code> file in a
<code>.helix</code> folder. Its settings will be merged with the language configuration <code>.helix</code> folder. Its settings will be merged with the language configuration
in the configuration directory and the built-in configuration.</li> in the configuration directory and the built-in configuration.</p>
</li>
</ol> </ol>
<h2 id="language-configuration"><a class="header" href="#language-configuration">Language configuration</a></h2> <h2 id="language-configuration"><a class="header" href="#language-configuration">Language configuration</a></h2>
<p>Each language is configured by adding a <code>[[language]]</code> section to a <p>Each language is configured by adding a <code>[[language]]</code> section to a
@ -261,7 +261,7 @@ languages = { typescript = [ { formatCommand =&quot;prettier --stdin-filepath ${
</div> </div>
<p>A <code>format</code> sub-table within <code>config</code> can be used to pass extra formatting options to <p>A <code>format</code> sub-table within <code>config</code> can be used to pass extra formatting options to
<a href="https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-17.md#document-formatting-request--leftwards_arrow_with_hook">Document Formatting Requests</a>. <a href="https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-17.md#document-formatting-request--leftwards_arrow_with_hook">Document Formatting Requests</a>.
For example with typescript:</p> For example, with typescript:</p>
<pre><code class="language-toml">[language-server.typescript-language-server] <pre><code class="language-toml">[language-server.typescript-language-server]
# pass format options according to https://github.com/typescript-language-server/typescript-language-server#workspacedidchangeconfiguration omitting the &quot;[language].format.&quot; prefix. # pass format options according to https://github.com/typescript-language-server/typescript-language-server#workspacedidchangeconfiguration omitting the &quot;[language].format.&quot; prefix.
config = { format = { &quot;semicolons&quot; = &quot;insert&quot;, &quot;insertSpaceBeforeFunctionParenthesis&quot; = true } } config = { format = { &quot;semicolons&quot; = &quot;insert&quot;, &quot;insertSpaceBeforeFunctionParenthesis&quot; = true } }
@ -272,8 +272,8 @@ config = { format = { &quot;semicolons&quot; = &quot;insert&quot;, &quot;insertS
<p>Different languages can use the same language server instance, e.g. <code>typescript-language-server</code> is used for javascript, jsx, tsx and typescript by default.</p> <p>Different languages can use the same language server instance, e.g. <code>typescript-language-server</code> is used for javascript, jsx, tsx and typescript by default.</p>
<p>In case multiple language servers are specified in the <code>language-servers</code> attribute of a <code>language</code>, <p>In case multiple language servers are specified in the <code>language-servers</code> attribute of a <code>language</code>,
it's often useful to only enable/disable certain language-server features for these language servers.</p> it's often useful to only enable/disable certain language-server features for these language servers.</p>
<p>For example <code>efm-lsp-prettier</code> of the previous example is used only with a formatting command <code>prettier</code>, <p>As an example, <code>efm-lsp-prettier</code> of the previous example is used only with a formatting command <code>prettier</code>,
so everything else should be handled by the <code>typescript-language-server</code> (which is configured by default) so everything else should be handled by the <code>typescript-language-server</code> (which is configured by default).
The language configuration for typescript could look like this:</p> The language configuration for typescript could look like this:</p>
<pre><code class="language-toml">[[language]] <pre><code class="language-toml">[[language]]
name = &quot;typescript&quot; name = &quot;typescript&quot;
@ -285,10 +285,10 @@ name = &quot;typescript&quot;
language-servers = [ { name = &quot;typescript-language-server&quot;, except-features = [ &quot;format&quot; ] }, &quot;efm-lsp-prettier&quot; ] language-servers = [ { name = &quot;typescript-language-server&quot;, except-features = [ &quot;format&quot; ] }, &quot;efm-lsp-prettier&quot; ]
</code></pre> </code></pre>
<p>Each requested LSP feature is prioritized in the order of the <code>language-servers</code> array. <p>Each requested LSP feature is prioritized in the order of the <code>language-servers</code> array.
For example the first <code>goto-definition</code> supported language server (in this case <code>typescript-language-server</code>) will be taken for the relevant LSP request (command <code>goto_definition</code>). For example, the first <code>goto-definition</code> supported language server (in this case <code>typescript-language-server</code>) will be taken for the relevant LSP request (command <code>goto_definition</code>).
The features <code>diagnostics</code>, <code>code-action</code>, <code>completion</code>, <code>document-symbols</code> and <code>workspace-symbols</code> are an exception to that rule, as they are working for all language servers at the same time and are merged together, if enabled for the language. The features <code>diagnostics</code>, <code>code-action</code>, <code>completion</code>, <code>document-symbols</code> and <code>workspace-symbols</code> are an exception to that rule, as they are working for all language servers at the same time and are merged together, if enabled for the language.
If no <code>except-features</code> or <code>only-features</code> is given all features for the language server are enabled. If no <code>except-features</code> or <code>only-features</code> is given, all features for the language server are enabled.
If a language server itself doesn't support a feature the next language server array entry will be tried (and so on).</p> If a language server itself doesn't support a feature, the next language server array entry will be tried (and so on).</p>
<p>The list of supported features is:</p> <p>The list of supported features is:</p>
<ul> <ul>
<li><code>format</code></li> <li><code>format</code></li>

@ -287,7 +287,7 @@ You can get <a href="https://www.microsoft.com/p/app-installer/9nblggh4nns1#acti
<ul> <ul>
<li>The <a href="https://www.rust-lang.org/tools/install">Rust toolchain</a></li> <li>The <a href="https://www.rust-lang.org/tools/install">Rust toolchain</a></li>
<li>The <a href="https://git-scm.com/">Git version control system</a></li> <li>The <a href="https://git-scm.com/">Git version control system</a></li>
<li>A c++14 compatible compiler to build the tree-sitter grammars, for example GCC or Clang</li> <li>A C++14 compatible compiler to build the tree-sitter grammars, for example GCC or Clang</li>
</ul> </ul>
<p>If you are using the <code>musl-libc</code> standard library instead of <code>glibc</code> the following environment variable must be set during the build to ensure tree-sitter grammars can be loaded correctly:</p> <p>If you are using the <code>musl-libc</code> standard library instead of <code>glibc</code> the following environment variable must be set during the build to ensure tree-sitter grammars can be loaded correctly:</p>
<pre><code class="language-sh">RUSTFLAGS=&quot;-C target-feature=-crt-static&quot; <pre><code class="language-sh">RUSTFLAGS=&quot;-C target-feature=-crt-static&quot;
@ -905,7 +905,7 @@ end = &quot;no_op&quot;
<h2 id="select--extend-mode"><a class="header" href="#select--extend-mode">Select / extend mode</a></h2> <h2 id="select--extend-mode"><a class="header" href="#select--extend-mode">Select / extend mode</a></h2>
<p>Select mode echoes Normal mode, but changes any movements to extend <p>Select mode echoes Normal mode, but changes any movements to extend
selections rather than replace them. Goto motions are also changed to selections rather than replace them. Goto motions are also changed to
extend, so that <code>vgl</code> for example extends the selection to the end of extend, so that <code>vgl</code>, for example, extends the selection to the end of
the line.</p> the line.</p>
<p>Search is also affected. By default, <code>n</code> and <code>N</code> will remove the current <p>Search is also affected. By default, <code>n</code> and <code>N</code> will remove the current
selection and select the next instance of the search term. Toggling this selection and select the next instance of the search term. Toggling this
@ -1961,16 +1961,14 @@ in <code>languages.toml</code> files.</p>
<p>There are three possible locations for a <code>languages.toml</code> file:</p> <p>There are three possible locations for a <code>languages.toml</code> file:</p>
<ol> <ol>
<li> <li>
<p>In the Helix source code, this lives in the <p>In the Helix source code, which lives in the
<a href="https://github.com/helix-editor/helix/blob/master/languages.toml">Helix repository</a>. <a href="https://github.com/helix-editor/helix/blob/master/languages.toml">Helix repository</a>.
It provides the default configurations for languages and language servers.</p> It provides the default configurations for languages and language servers.</p>
</li> </li>
<li> <li>
<p>In your <a href="./configuration.html">configuration directory</a>. This overrides values <p>In your <a href="./configuration.html">configuration directory</a>. This overrides values
from the built-in language configuration. For example to disable from the built-in language configuration. For example, to disable
auto-LSP-formatting in Rust:</p> auto-LSP-formatting in Rust:</p>
</li>
</ol>
<pre><code class="language-toml"># in &lt;config_dir&gt;/helix/languages.toml <pre><code class="language-toml"># in &lt;config_dir&gt;/helix/languages.toml
[language-server.mylang-lsp] [language-server.mylang-lsp]
@ -1980,11 +1978,13 @@ command = &quot;mylang-lsp&quot;
name = &quot;rust&quot; name = &quot;rust&quot;
auto-format = false auto-format = false
</code></pre> </code></pre>
<ol start="3"> </li>
<li>In a <code>.helix</code> folder in your project. Language configuration may also be <li>
<p>In a <code>.helix</code> folder in your project. Language configuration may also be
overridden local to a project by creating a <code>languages.toml</code> file in a overridden local to a project by creating a <code>languages.toml</code> file in a
<code>.helix</code> folder. Its settings will be merged with the language configuration <code>.helix</code> folder. Its settings will be merged with the language configuration
in the configuration directory and the built-in configuration.</li> in the configuration directory and the built-in configuration.</p>
</li>
</ol> </ol>
<h2 id="language-configuration"><a class="header" href="#language-configuration">Language configuration</a></h2> <h2 id="language-configuration"><a class="header" href="#language-configuration">Language configuration</a></h2>
<p>Each language is configured by adding a <code>[[language]]</code> section to a <p>Each language is configured by adding a <code>[[language]]</code> section to a
@ -2068,7 +2068,7 @@ languages = { typescript = [ { formatCommand =&quot;prettier --stdin-filepath ${
</div> </div>
<p>A <code>format</code> sub-table within <code>config</code> can be used to pass extra formatting options to <p>A <code>format</code> sub-table within <code>config</code> can be used to pass extra formatting options to
<a href="https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-17.md#document-formatting-request--leftwards_arrow_with_hook">Document Formatting Requests</a>. <a href="https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-17.md#document-formatting-request--leftwards_arrow_with_hook">Document Formatting Requests</a>.
For example with typescript:</p> For example, with typescript:</p>
<pre><code class="language-toml">[language-server.typescript-language-server] <pre><code class="language-toml">[language-server.typescript-language-server]
# pass format options according to https://github.com/typescript-language-server/typescript-language-server#workspacedidchangeconfiguration omitting the &quot;[language].format.&quot; prefix. # pass format options according to https://github.com/typescript-language-server/typescript-language-server#workspacedidchangeconfiguration omitting the &quot;[language].format.&quot; prefix.
config = { format = { &quot;semicolons&quot; = &quot;insert&quot;, &quot;insertSpaceBeforeFunctionParenthesis&quot; = true } } config = { format = { &quot;semicolons&quot; = &quot;insert&quot;, &quot;insertSpaceBeforeFunctionParenthesis&quot; = true } }
@ -2079,8 +2079,8 @@ config = { format = { &quot;semicolons&quot; = &quot;insert&quot;, &quot;insertS
<p>Different languages can use the same language server instance, e.g. <code>typescript-language-server</code> is used for javascript, jsx, tsx and typescript by default.</p> <p>Different languages can use the same language server instance, e.g. <code>typescript-language-server</code> is used for javascript, jsx, tsx and typescript by default.</p>
<p>In case multiple language servers are specified in the <code>language-servers</code> attribute of a <code>language</code>, <p>In case multiple language servers are specified in the <code>language-servers</code> attribute of a <code>language</code>,
it's often useful to only enable/disable certain language-server features for these language servers.</p> it's often useful to only enable/disable certain language-server features for these language servers.</p>
<p>For example <code>efm-lsp-prettier</code> of the previous example is used only with a formatting command <code>prettier</code>, <p>As an example, <code>efm-lsp-prettier</code> of the previous example is used only with a formatting command <code>prettier</code>,
so everything else should be handled by the <code>typescript-language-server</code> (which is configured by default) so everything else should be handled by the <code>typescript-language-server</code> (which is configured by default).
The language configuration for typescript could look like this:</p> The language configuration for typescript could look like this:</p>
<pre><code class="language-toml">[[language]] <pre><code class="language-toml">[[language]]
name = &quot;typescript&quot; name = &quot;typescript&quot;
@ -2092,10 +2092,10 @@ name = &quot;typescript&quot;
language-servers = [ { name = &quot;typescript-language-server&quot;, except-features = [ &quot;format&quot; ] }, &quot;efm-lsp-prettier&quot; ] language-servers = [ { name = &quot;typescript-language-server&quot;, except-features = [ &quot;format&quot; ] }, &quot;efm-lsp-prettier&quot; ]
</code></pre> </code></pre>
<p>Each requested LSP feature is prioritized in the order of the <code>language-servers</code> array. <p>Each requested LSP feature is prioritized in the order of the <code>language-servers</code> array.
For example the first <code>goto-definition</code> supported language server (in this case <code>typescript-language-server</code>) will be taken for the relevant LSP request (command <code>goto_definition</code>). For example, the first <code>goto-definition</code> supported language server (in this case <code>typescript-language-server</code>) will be taken for the relevant LSP request (command <code>goto_definition</code>).
The features <code>diagnostics</code>, <code>code-action</code>, <code>completion</code>, <code>document-symbols</code> and <code>workspace-symbols</code> are an exception to that rule, as they are working for all language servers at the same time and are merged together, if enabled for the language. The features <code>diagnostics</code>, <code>code-action</code>, <code>completion</code>, <code>document-symbols</code> and <code>workspace-symbols</code> are an exception to that rule, as they are working for all language servers at the same time and are merged together, if enabled for the language.
If no <code>except-features</code> or <code>only-features</code> is given all features for the language server are enabled. If no <code>except-features</code> or <code>only-features</code> is given, all features for the language server are enabled.
If a language server itself doesn't support a feature the next language server array entry will be tried (and so on).</p> If a language server itself doesn't support a feature, the next language server array entry will be tried (and so on).</p>
<p>The list of supported features is:</p> <p>The list of supported features is:</p>
<ul> <ul>
<li><code>format</code></li> <li><code>format</code></li>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save