add support markdown matchup (#415)

This commit is contained in:
XiaoTian
2025-10-03 21:45:17 +08:00
committed by GitHub
parent 9ae7f86c31
commit ca538c3bb0
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
;; ====================
;; fenced code block ```
;; ====================
(fenced_code_block
(fenced_code_block_delimiter) @open.code_fence
(fenced_code_block_delimiter) @close.code_fence) @scope.code_fence

View File

@@ -0,0 +1,36 @@
;; ===========
;; inline code `
;; ===========
(code_span
(code_span_delimiter) @open.code
(code_span_delimiter) @close.code) @scope.code
;; ===========================
;; emphasis (italic, *...* / _..._)
;; ===========================
(emphasis
(emphasis_delimiter) @open.emphasis
(emphasis_delimiter) @close.emphasis) @scope.emphasis
;; ===========================
;; strong emphasis (bold, **...** / __...__)
;; ===========================
(strong_emphasis
(emphasis_delimiter) @open.strong
(emphasis_delimiter) @open.strong
(emphasis_delimiter) @close.strong
(emphasis_delimiter) @close.strong) @scope.strong
;; ===========================
;; strikethrough (~~...~~)
;; ===========================
(strikethrough
(emphasis_delimiter) @open.strikethrough
(emphasis_delimiter) @close.strikethrough) @scope.strikethrough
;; ===========================
;; LaTeX math ($...$ / $$...$$)
;; ===========================
(latex_block
(latex_span_delimiter) @open.math
(latex_span_delimiter) @close.math) @scope.math