Use standard injection.language and injection.content captures (#22268)
Closes #9656. Continuation of #9654, but with the addition of backwards compatibility for the existing captures. Release Notes: - Improved Tree-sitter support with added compatibility for standard injections captures --------- Co-authored-by: Finn Evers <finn.evers@outlook.de>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
; https://github.com/nvim-treesitter/nvim-treesitter/blob/ce4adf11cfe36fc5b0e5bcdce0c7c6e8fbc9798a/queries/hcl/injections.scm
|
||||
|
||||
(heredoc_template
|
||||
(template_literal) @content
|
||||
(heredoc_identifier) @language
|
||||
(#downcase! @language))
|
||||
(template_literal) @injection.content
|
||||
(heredoc_identifier) @injection.language
|
||||
(#downcase! @injection.language))
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
; https://github.com/nvim-treesitter/nvim-treesitter/blob/ce4adf11cfe36fc5b0e5bcdce0c7c6e8fbc9798a/queries/hcl/injections.scm
|
||||
|
||||
(heredoc_template
|
||||
(template_literal) @content
|
||||
(heredoc_identifier) @language
|
||||
(#downcase! @language))
|
||||
(template_literal) @injection.content
|
||||
(heredoc_identifier) @injection.language
|
||||
(#downcase! @injection.language))
|
||||
|
||||
; https://github.com/nvim-treesitter/nvim-treesitter/blob/ce4adf11cfe36fc5b0e5bcdce0c7c6e8fbc9798a/queries/terraform/injections.scm
|
||||
; inherits: hcl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
; https://github.com/nvim-treesitter/nvim-treesitter/blob/ce4adf11cfe36fc5b0e5bcdce0c7c6e8fbc9798a/queries/hcl/injections.scm
|
||||
|
||||
(heredoc_template
|
||||
(template_literal) @content
|
||||
(heredoc_identifier) @language
|
||||
(#downcase! @language))
|
||||
(template_literal) @injection.content
|
||||
(heredoc_identifier) @injection.language
|
||||
(#downcase! @injection.language))
|
||||
|
||||
; https://github.com/nvim-treesitter/nvim-treesitter/blob/ce4adf11cfe36fc5b0e5bcdce0c7c6e8fbc9798a/queries/terraform/injections.scm
|
||||
; inherits: hcl
|
||||
|
||||
Reference in New Issue
Block a user