changeset 830:3dc425f9ac53

feat: inject regex grammar into hgrc
author zegervdv <zegervdv@me.com>
date Sat, 06 Jan 2024 10:57:41 +0100
parents bd41aac927e6
children cb9216ce3678
files dot_config/helix/languages.toml dot_config/helix/runtime/queries/hgrc/highlights.scm dot_config/helix/runtime/queries/hgrc/injections.scm
diffstat 3 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dot_config/helix/languages.toml	Wed Jan 03 11:44:16 2024 +0100
+++ b/dot_config/helix/languages.toml	Sat Jan 06 10:57:41 2024 +0100
@@ -33,7 +33,7 @@
 
 [[grammar]]
 name = "hgrc"
-source = { git = "https://github.com/zegervdv/tree-sitter-hgrc.git", rev = "6bbb8cc15cd489b66244517c3c5bbf4b19fd8ffa" }
+source = { git = "https://github.com/zegervdv/tree-sitter-hgrc.git", rev = "44d82932def8f7cdea0a57688ada136707a51fd7" }
 
 [[language]]
 name = "hgrc"
--- a/dot_config/helix/runtime/queries/hgrc/highlights.scm	Wed Jan 03 11:44:16 2024 +0100
+++ b/dot_config/helix/runtime/queries/hgrc/highlights.scm	Sat Jan 06 10:57:41 2024 +0100
@@ -23,3 +23,5 @@
 (operator) @operator
 
 (string (escape) @constant.character.escape)
+
+(regex) @string
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dot_config/helix/runtime/queries/hgrc/injections.scm	Sat Jan 06 10:57:41 2024 +0100
@@ -0,0 +1,2 @@
+((regex_pattern) @injection.content
+  (#set! injection.language "regex"))