Skip to content

Commit

Permalink
Add queries for sphinxnotes-strike and sphinx-design (#21)
Browse files Browse the repository at this point in the history
* Add highlight query for sphinxnotes-strike

* Add injection query for sphinx-design
  • Loading branch information
SilverRainZ authored Oct 30, 2024
1 parent d4eceb3 commit 0dae62f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions after/queries/rst/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,12 @@
(#eq?
@function.builtin
":math:numref:"))

; sphinxnotes-strike
; https://sphinx.silverrainz.me/strike/
((interpreted_text
(role) @_role
"interpreted_text" @markup.strikethrough)
(#any-of?
@_role
":del:" ":strike:"))
13 changes: 13 additions & 0 deletions after/queries/rst/injections.scm
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,16 @@
name: (type) @_type
body: (body (arguments) @injection.language (content) @injection.content))
(#eq? @_type "prompt"))

;;; sphinx-design
;;; https://sphinx-design.readthedocs.io/
((directive
name: (type) @_type
body: (body (content) @injection.content))
(#any-of?
@_type
"grid" "grid-item" "grid-item-card"
"card" "card-carousel"
"dropdown"
"tabset" "tab-set-code" "tab-item")
(#set! injection.language "rst"))

0 comments on commit 0dae62f

Please sign in to comment.