feat(highlight): migrate to tree-house with Helix queries
Replace tree-sitter-highlight dep with tree-house crate from Helix editor. Add ropey dependency required by tree-house. Reorganize query files from Helix's runtime/queries/ for all 14 supported languages: - bash, c, css, go, html, javascript, json, markdown, nix, python, rust, toml, typescript, yaml - Include ecma, _javascript, _typescript base dirs for JS/TS inheritance - Copy highlights.scm, injections.scm, locals.scm where available This commit establishes the foundation; highlight.rs implementation will follow in subsequent commits.
This commit is contained in:
22
queries/markdown/injections.scm
Normal file
22
queries/markdown/injections.scm
Normal file
@@ -0,0 +1,22 @@
|
||||
; From nvim-treesitter/nvim-treesitter
|
||||
|
||||
(fenced_code_block
|
||||
(code_fence_content) @injection.shebang @injection.content
|
||||
(#set! injection.include-unnamed-children))
|
||||
|
||||
(fenced_code_block
|
||||
(info_string
|
||||
(language) @injection.language)
|
||||
(code_fence_content) @injection.content (#set! injection.include-unnamed-children))
|
||||
|
||||
((html_block) @injection.content
|
||||
(#set! injection.language "html")
|
||||
(#set! injection.include-unnamed-children)
|
||||
(#set! injection.combined))
|
||||
|
||||
((pipe_table_cell) @injection.content (#set! injection.language "markdown.inline") (#set! injection.include-unnamed-children))
|
||||
|
||||
((minus_metadata) @injection.content (#set! injection.language "yaml") (#set! injection.include-unnamed-children))
|
||||
((plus_metadata) @injection.content (#set! injection.language "toml") (#set! injection.include-unnamed-children))
|
||||
|
||||
((inline) @injection.content (#set! injection.language "markdown.inline") (#set! injection.include-unnamed-children))
|
||||
Reference in New Issue
Block a user