better mdx support

This commit is contained in:
Zynh0722 2024-03-15 05:22:22 -07:00
parent 84ed8665bb
commit d915829d01
2 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,4 @@
;extends
((inline) @_inline (#lua-match? @_inline "^%s*import")) @nospell
((inline) @_inline (#lua-match? @_inline "^%s*export")) @nospell

View file

@ -1,7 +1,16 @@
;extends ;extends
; Supporting dataviewjs
(fenced_code_block (fenced_code_block
((info_string) @_lang ((info_string) @_lang
(#match? @_lang "(dataviewjs)")) (#match? @_lang "(dataviewjs)"))
(code_fence_content) @javascript (code_fence_content) @javascript
) )
; Supporting MDX
((inline) @injection.content
(#lua-match? @injection.content "^%s*import")
(#set! injection.language "typescript"))
((inline) @injection.content
(#lua-match? @injection.content "^%s*export")
(#set! injection.language "typescript"))