From d6b6ad879e297ff786ce520acd3ce9c4ff3c2e8e Mon Sep 17 00:00:00 2001 From: Daniel S Poulin Date: Mon, 31 Jan 2022 22:35:07 -0500 Subject: epocsquadron/add tree sitter twig (#1602) * Add tree-sitter-twig grammer and highlights The gammar itself is quite basic, but is much better than nothing for working with real files consisting mostly of html. * Docgen for newly added grammar--- runtime/queries/twig/highlights.scm | 16 ++++++++++++++++ runtime/queries/twig/injections.scm | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 runtime/queries/twig/highlights.scm create mode 100644 runtime/queries/twig/injections.scm (limited to 'runtime/queries') diff --git a/runtime/queries/twig/highlights.scm b/runtime/queries/twig/highlights.scm new file mode 100644 index 00000000..2c95ab63 --- /dev/null +++ b/runtime/queries/twig/highlights.scm @@ -0,0 +1,16 @@ +(comment_directive) @comment + +[ + "{%" + "{%-" + "{%~" + "%}" + "-%}" + "~%}" + "{{" + "{{-" + "{{~" + "}}" + "-}}" + "~}}" +] @keyword diff --git a/runtime/queries/twig/injections.scm b/runtime/queries/twig/injections.scm new file mode 100644 index 00000000..f0822734 --- /dev/null +++ b/runtime/queries/twig/injections.scm @@ -0,0 +1,3 @@ +((content) @injection.content + (#set! injection.language "html") + (#set! injection.combined)) -- cgit v1.2.3-70-g09d2