# HG changeset patch # User zegervdv # Date 1703237252 -3600 # Node ID b2e6175efcad8708fc002450e9dbecc50e771201 # Parent 6c169d906c7dd1bcd25ebf94fce50cfd35374815 feat: add hgrc grammar and highlights diff -r 6c169d906c7d -r b2e6175efcad dot_config/helix/languages.toml --- 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"] diff -r 6c169d906c7d -r b2e6175efcad dot_config/helix/runtime/queries/hgrc/highlights.scm --- /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