mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 13:00:08 -04:00
chore(injections)!: update injection syntax to 0.9
Since 0.9, @lang syntax is still available as fallback but will soon be deprecated. Because of that, new syntax should be adopted once 0.9 becomes the baseline requirements for nvim-treesitter - update health check - update doc
This commit is contained in:
parent
2aa9e9b0e6
commit
78b54eb7f6
140 changed files with 1083 additions and 665 deletions
|
|
@ -1,5 +1,6 @@
|
|||
; Comments
|
||||
(comment) @comment
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
; Documentation
|
||||
(unary_operator
|
||||
|
|
@ -7,42 +8,49 @@
|
|||
operand: (call
|
||||
target: ((identifier) @_identifier (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc"))
|
||||
(arguments [
|
||||
(string (quoted_content) @markdown)
|
||||
(sigil (quoted_content) @markdown)
|
||||
])))
|
||||
(string (quoted_content) @injection.content)
|
||||
(sigil (quoted_content) @injection.content)
|
||||
])
|
||||
(#set! injection.language "markdown")))
|
||||
|
||||
; HEEx
|
||||
(sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @heex
|
||||
(#eq? @_sigil_name "H"))
|
||||
(quoted_content) @injection.content
|
||||
(#eq? @_sigil_name "H")
|
||||
(#set! injection.language "heex"))
|
||||
|
||||
; Surface
|
||||
(sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @surface
|
||||
(#eq? @_sigil_name "F"))
|
||||
(quoted_content) @injection.content
|
||||
(#eq? @_sigil_name "F")
|
||||
(#set! injection.language "surface"))
|
||||
|
||||
; Zigler
|
||||
(sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @eex
|
||||
(#any-of? @_sigil_name "E" "L"))
|
||||
(quoted_content) @injection.content
|
||||
(#any-of? @_sigil_name "E" "L")
|
||||
(#set! injection.language "eex"))
|
||||
|
||||
(sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @zig
|
||||
(#any-of? @_sigil_name "z" "Z"))
|
||||
(quoted_content) @injection.content
|
||||
(#any-of? @_sigil_name "z" "Z")
|
||||
(#set! injection.language "zig"))
|
||||
|
||||
; Regex
|
||||
(sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @regex
|
||||
(#any-of? @_sigil_name "r" "R"))
|
||||
(quoted_content) @injection.content
|
||||
(#any-of? @_sigil_name "r" "R")
|
||||
(#set! injection.language "regex"))
|
||||
|
||||
; Jason
|
||||
; Json
|
||||
(sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @json
|
||||
(#any-of? @_sigil_name "j" "J"))
|
||||
(quoted_content) @injection.content
|
||||
(#any-of? @_sigil_name "j" "J")
|
||||
(#set! injection.language "json"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue