diff options
author | Timothy DeHerrera | 2023-04-28 09:21:34 +0000 |
---|---|---|
committer | GitHub | 2023-04-28 09:21:34 +0000 |
commit | 9c6c63a2be30252a6207f4aebb5e0f76f746b4c8 (patch) | |
tree | cb1882ee0b719e2bf5fc8444b494ba0948dea178 /languages.toml | |
parent | 204d1eba4b1bb09d2e861986d6b6e8b868d16afe (diff) |
inject language based on file extension & shebang (#3970)
* inject language based on file extension
Nodes can now be captured with "injection.filename". If this capture
contains a valid file extension known to Helix, then the content will
be highlighted as that language.
* inject language by shebang
Nodes can now be captured with "injection.shebang". If this capture
contains a valid shebang line known to Helix, then the content will
be highlighted as the language the shebang calls for.
* add documentation for language injection
* nix: fix highlights
The `@` is now highlighted properly on either side of the function arg.
Also, extending the phases with `buildPhase = prev.buildPhase + ''''`
is now highlighted properly.
Fix highlighting of `''$` style escapes (requires tree-sitter-nix bump)
Fix `inherit` highlighting.
* simplify injection_for_match
Split out injection pair logic into its own method to make the overall
flow easier to follow.
Also transform the top-level function into a method on a
HighlightConfiguration.
* markdown: add shebang injection query
Diffstat (limited to 'languages.toml')
-rw-r--r-- | languages.toml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/languages.toml b/languages.toml index 14da46c1..9a0a538a 100644 --- a/languages.toml +++ b/languages.toml @@ -591,7 +591,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "nix" -source = { git = "https://github.com/nix-community/tree-sitter-nix", rev = "6b71a810c0acd49b980c50fc79092561f7cee307" } +source = { git = "https://github.com/nix-community/tree-sitter-nix", rev = "1b69cf1fa92366eefbe6863c184e5d2ece5f187d" } [[language]] name = "ruby" |