mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
f5dc453109
Problem: Sharing queries with upstream and Helix is difficult due to different capture names. Solution: Define and document a new set of standard captures that matches tree-sitter "standard captures" (where defined) and is closer to Helix' Atom-style nested groups. This is a breaking change for colorschemes that defined highlights based on the old captures. On the other hand, the default colorscheme now defines links for all standard captures (not just those used in bundled queries), improving the out-of-the-box experience.
26 lines
659 B
Scheme
26 lines
659 B
Scheme
(fenced_code_block
|
|
(info_string
|
|
(language) @injection.language)
|
|
(code_fence_content) @injection.content)
|
|
|
|
((html_block) @injection.content
|
|
(#set! injection.language "html")
|
|
(#set! injection.combined)
|
|
(#set! injection.include-children))
|
|
|
|
((minus_metadata) @injection.content
|
|
(#set! injection.language "yaml")
|
|
(#offset! @injection.content 1 0 -1 0)
|
|
(#set! injection.include-children))
|
|
|
|
((plus_metadata) @injection.content
|
|
(#set! injection.language "toml")
|
|
(#offset! @injection.content 1 0 -1 0)
|
|
(#set! injection.include-children))
|
|
|
|
([
|
|
(inline)
|
|
(pipe_table_cell)
|
|
] @injection.content
|
|
(#set! injection.language "markdown_inline"))
|