Skip to content

Commit

Permalink
feat!: migrate rest of queries to V3
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Aug 17, 2023
1 parent 0c8ea45 commit b141fc0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
13 changes: 3 additions & 10 deletions queries/norg/folds.scm
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion queries/norg/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions queries/norg/injections.scm
Original file line number Diff line number Diff line change
@@ -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"))

0 comments on commit b141fc0

Please sign in to comment.