changeset 826:b2e6175efcad

feat: add hgrc grammar and highlights
author zegervdv <zegervdv@me.com>
date Fri, 22 Dec 2023 10:27:32 +0100
parents 6c169d906c7d
children e4d67607d020
files dot_config/helix/languages.toml dot_config/helix/runtime/queries/hgrc/highlights.scm
diffstat 2 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dot_config/helix/languages.toml	Thu Dec 21 11:47:51 2023 +0100
+++ b/dot_config/helix/languages.toml	Fri Dec 22 10:27:32 2023 +0100
@@ -30,3 +30,16 @@
 [[language]]
 name = 'gotmpl'
 file-types = ["tmpl"]
+
+[[grammar]]
+name = "hgrc"
+source = { git = "https://github.com/zegervdv/tree-sitter-hgrc.git", rev = "d20aa925aa0c56d68215395b9e65dc6003cdcffb" }
+
+[[language]]
+name = "hgrc"
+scope = "source.hgrc"
+injection-regex = "hgrc"
+file-types = ["hgrc", ".hgrc"]
+comment-token = "#"
+indent = { tab-width = 2, unit = " " }
+roots = [".hg"]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dot_config/helix/runtime/queries/hgrc/highlights.scm	Fri Dec 22 10:27:32 2023 +0100
@@ -0,0 +1,11 @@
+(section
+  (name) @namespace)
+
+(option
+  (option_name) @keyword)
+
+(path) @string.special.path
+(string) @string
+(bool) @constant.builtin.boolean
+
+(comment) @comment