mirror of
https://github.com/neovim/neovim.git
synced 2026-04-26 01:04:10 +00:00
fix(treesitter): ":EditQuery [lang]" with injected languages #34914
Problem: `:EditQuery` command accepts a language argument, but it doesn't highlight properly for injected languages. Solution: - Fully parse with the root language and then filter the query on the child trees that are of the language requested. - Also support completion (`EditQuery <tab>`).
This commit is contained in:
@@ -1165,6 +1165,8 @@ end
|
||||
---
|
||||
--- Can also be shown with `:EditQuery`. [:EditQuery]()
|
||||
---
|
||||
--- `:EditQuery <tab>` completes the treesitter parser names in the runtime path.
|
||||
---
|
||||
--- If you move the cursor to a capture name ("@foo"), text matching the capture is highlighted in
|
||||
--- the source buffer. The query editor is a scratch buffer, use `:write` to save it. You can find
|
||||
--- example queries at `$VIMRUNTIME/queries/`.
|
||||
|
||||
Reference in New Issue
Block a user