From 494545e8e3e1092a4845d36085f9e6fd3679e83a Mon Sep 17 00:00:00 2001 From: the-mikedavis Date: Sat, 28 Dec 2024 14:07:21 +0000 Subject: [PATCH] deploy: 127567df8e88cfa71feb66619a6016988d984256 --- master/guides/adding_languages.html | 2 +- master/guides/injection.html | 2 +- master/guides/textobject.html | 4 ++-- master/languages.html | 2 +- master/print.html | 12 ++++++------ master/themes.html | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/master/guides/adding_languages.html b/master/guides/adding_languages.html index a7969b948..3ba4f757c 100644 --- a/master/guides/adding_languages.html +++ b/master/guides/adding_languages.html @@ -195,7 +195,7 @@ you will need to add queries.
  • Create a new directory for the language with the path runtime/queries/<name>/.
  • Refer to the -tree-sitter website +tree-sitter website for more information on writing queries.
  • A list of highlight captures can be found on the themes page.
  • diff --git a/master/guides/injection.html b/master/guides/injection.html index c551ada8d..f9214b4d6 100644 --- a/master/guides/injection.html +++ b/master/guides/injection.html @@ -162,7 +162,7 @@

    Adding Injection Queries

    Writing language injection queries allows one to highlight a specific node as a different language. -In addition to the standard language injection options used by tree-sitter, there +In addition to the standard language injection options used by tree-sitter, there are a few Helix specific extensions that allow for more control.

    And example of a simple query that would highlight all strings as bash in Nix:

    ((string_expression (string_fragment) @injection.content)
    diff --git a/master/guides/textobject.html b/master/guides/textobject.html
    index 633d20505..e648fb20a 100644
    --- a/master/guides/textobject.html
    +++ b/master/guides/textobject.html
    @@ -165,13 +165,13 @@
     These textobjects require an accompanying tree-sitter grammar and a textobjects.scm query file
     to work properly. Tree-sitter allows us to query the source code syntax tree
     and capture specific parts of it. The queries are written in a lisp dialect.
    -More information on how to write queries can be found in the official tree-sitter
    +More information on how to write queries can be found in the official tree-sitter
     documentation.

    Query files should be placed in runtime/queries/{language}/textobjects.scm when contributing to Helix. Note that to test the query files locally you should put them under your local runtime directory (~/.config/helix/runtime on Linux for example).

    -

    The following captures are recognized:

    +

    The following captures are recognized:

    diff --git a/master/languages.html b/master/languages.html index ce9bd8b36..37b931132 100644 --- a/master/languages.html +++ b/master/languages.html @@ -210,7 +210,7 @@ language-servers = [ "mylang-lsp" ] - + diff --git a/master/print.html b/master/print.html index c1dc1bce9..f0d0046c9 100644 --- a/master/print.html +++ b/master/print.html @@ -2244,7 +2244,7 @@ berry = "#2A2A4D"

    Scopes

    The following is a list of scopes available to use for styling:

    Syntax highlighting

    -

    These keys match tree-sitter scopes.

    +

    These keys match tree-sitter scopes.

    When determining styling for a highlight, the longest matching theme key will be used. For example, if the highlight is function.builtin.static, the key function.builtin will be used instead of function.

    We use a similar set of scopes as Sublime Text. See also @@ -2704,7 +2704,7 @@ language-servers = [ "mylang-lsp" ]

    - + @@ -2892,7 +2892,7 @@ you will need to add queries.
  • Create a new directory for the language with the path runtime/queries/<name>/.
  • Refer to the -tree-sitter website +tree-sitter website for more information on writing queries.
  • A list of highlight captures can be found on the themes page.
  • @@ -2918,13 +2918,13 @@ remove the compiled parser located at runtime/grammars/<name>.sotextobjects.scm query file to work properly. Tree-sitter allows us to query the source code syntax tree and capture specific parts of it. The queries are written in a lisp dialect. -More information on how to write queries can be found in the official tree-sitter +More information on how to write queries can be found in the official tree-sitter documentation.

    Query files should be placed in runtime/queries/{language}/textobjects.scm when contributing to Helix. Note that to test the query files locally you should put them under your local runtime directory (~/.config/helix/runtime on Linux for example).

    -

    The following captures are recognized:

    +

    The following captures are recognized:

    Capture Name
    function.inside
    function.around
    nameThe name of the language
    language-idThe language-id for language servers, checkout the table at TextDocumentItem for the right id
    scopeA string like source.js that identifies the language. Currently, we strive to match the scope names used by popular TextMate grammars and by the Linguist library. Usually source.<name> or text.<name> in case of markup languages
    injection-regexregex pattern that will be tested against a language name in order to determine whether this language should be used for a potential language injection site.
    injection-regexregex pattern that will be tested against a language name in order to determine whether this language should be used for a potential language injection site.
    file-typesThe filetypes of the language, for example ["yml", "yaml"]. See the file-type detection section below.
    shebangsThe interpreters from the shebang line, for example ["sh", "bash"]
    rootsA set of marker files to look for when trying to find the workspace root. For example Cargo.lock, yarn.lock
    nameThe name of the language
    language-idThe language-id for language servers, checkout the table at TextDocumentItem for the right id
    scopeA string like source.js that identifies the language. Currently, we strive to match the scope names used by popular TextMate grammars and by the Linguist library. Usually source.<name> or text.<name> in case of markup languages
    injection-regexregex pattern that will be tested against a language name in order to determine whether this language should be used for a potential language injection site.
    injection-regexregex pattern that will be tested against a language name in order to determine whether this language should be used for a potential language injection site.
    file-typesThe filetypes of the language, for example ["yml", "yaml"]. See the file-type detection section below.
    shebangsThe interpreters from the shebang line, for example ["sh", "bash"]
    rootsA set of marker files to look for when trying to find the workspace root. For example Cargo.lock, yarn.lock
    @@ -3284,7 +3284,7 @@ line. (Note these scopes are the defaults for @indent and @ou written explicitly for demonstration.)

    Adding Injection Queries

    Writing language injection queries allows one to highlight a specific node as a different language. -In addition to the standard language injection options used by tree-sitter, there +In addition to the standard language injection options used by tree-sitter, there are a few Helix specific extensions that allow for more control.

    And example of a simple query that would highlight all strings as bash in Nix:

    ((string_expression (string_fragment) @injection.content)
    diff --git a/master/themes.html b/master/themes.html
    index f582f5220..ad4eb48ca 100644
    --- a/master/themes.html
    +++ b/master/themes.html
    @@ -264,7 +264,7 @@ berry = "#2A2A4D"
     

    Scopes

    The following is a list of scopes available to use for styling:

    Syntax highlighting

    -

    These keys match tree-sitter scopes.

    +

    These keys match tree-sitter scopes.

    When determining styling for a highlight, the longest matching theme key will be used. For example, if the highlight is function.builtin.static, the key function.builtin will be used instead of function.

    We use a similar set of scopes as Sublime Text. See also

    Capture Name
    function.inside
    function.around