mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -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.
33 lines
856 B
Scheme
33 lines
856 B
Scheme
(lua_statement
|
|
(script
|
|
(body) @injection.content
|
|
(#set! injection.language "lua")))
|
|
|
|
(lua_statement
|
|
(chunk) @injection.content
|
|
(#set! injection.language "lua"))
|
|
|
|
(ruby_statement
|
|
(script
|
|
(body) @injection.content
|
|
(#set! injection.language "ruby")))
|
|
|
|
(ruby_statement
|
|
(chunk) @injection.content
|
|
(#set! injection.language "ruby"))
|
|
|
|
(python_statement
|
|
(script
|
|
(body) @injection.content
|
|
(#set! injection.language "python")))
|
|
|
|
(python_statement
|
|
(chunk) @injection.content
|
|
(#set! injection.language "python"))
|
|
|
|
((set_item
|
|
option: (option_name) @_option
|
|
value: (set_value) @injection.content)
|
|
(#any-of? @_option "includeexpr" "inex" "printexpr" "pexpr" "formatexpr" "fex" "indentexpr" "inde" "foldtext" "fdt" "foldexpr" "fde" "diffexpr" "dex" "patchexpr" "pex" "charconvert" "ccv")
|
|
(#set! injection.language "vim"))
|