From b141fc04488d24b37e814994bd42cb1147b6bb39 Mon Sep 17 00:00:00 2001 From: Vhyrro Date: Thu, 17 Aug 2023 21:43:44 +0200 Subject: [PATCH] feat!: migrate rest of queries to V3 --- queries/norg/folds.scm | 13 +++---------- queries/norg/highlights.scm | 2 +- queries/norg/injections.scm | 14 +++++++------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/queries/norg/folds.scm b/queries/norg/folds.scm index 2e5be17223..89d6a77f82 100644 --- a/queries/norg/folds.scm +++ b/queries/norg/folds.scm @@ -1,13 +1,6 @@ -(ranged_verbatim_tag - name: (tag_name) @_name +(verbatim_ranged_tag + (tag_name) @_name (#eq? @_name "document.meta") ) @fold -[ - (heading1) - (heading2) - (heading3) - (heading4) - (heading5) - (heading6) -] @fold +(heading) @fold diff --git a/queries/norg/highlights.scm b/queries/norg/highlights.scm index 16a65db92d..4769af5379 100644 --- a/queries/norg/highlights.scm +++ b/queries/norg/highlights.scm @@ -10,7 +10,7 @@ "@" @neorg.tags.ranged_verbatim (tag_name) @neorg.tags.ranged_verbatim.name (#eq? @neorg.tags.ranged_verbatim.name "comment") - (content)? @neorg.tags.comment.content) + (verbatim_content)? @neorg.tags.comment.content) ( (strong_carryover_tag diff --git a/queries/norg/injections.scm b/queries/norg/injections.scm index 538736a89e..38f4d588b1 100644 --- a/queries/norg/injections.scm +++ b/queries/norg/injections.scm @@ -1,10 +1,10 @@ ; Injection for code blocks -(ranged_verbatim_tag (tag_name) @_tagname (tag_parameters .(tag_param) @language) (ranged_verbatim_tag_content) @content (#any-of? @_tagname "code" "embed")) -(ranged_verbatim_tag (tag_name) @_tagname (tag_parameters)? (ranged_verbatim_tag_content) @latex (#eq? @_tagname "math")) +(verbatim_ranged_tag (tag_name) @_tagname .(parameter) @language (verbatim_content) @content (#any-of? @_tagname "code" "embed")) +(verbatim_ranged_tag (tag_name) @_tagname (verbatim_content) @injection.content (#set! injection.language "latex") (#eq? @_tagname "math")) -( - (inline_math) @latex - (#offset! @latex 0 1 0 -1) -) +; ( +; (inline_math) @latex +; (#offset! @latex 0 1 0 -1) +; ) -(ranged_verbatim_tag (tag_name) @_tagname (ranged_verbatim_tag_content) @norg_meta (#eq? @_tagname "document.meta")) +(verbatim_ranged_tag (tag_name) @_tagname (verbatim_content) @injection.content (#set! injection.language "norg_meta") (#eq? @_tagname "document.meta"))