mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
d3575dc0ff
With this change textobjects work even within injection layers, so you can use `]f` to jump to a function definition in a JavaScript `<script>` tag within HTML for example. This requires `Syntax::query_iter` - a utility function for running a query from `HighlightConfiguration` across injection layers - which comes from the rainbow brackets branch (merged into my driver). We need to relocate the textobject query from the `LanguageConfiguration` to the `HighlightConfiguration` in order to access it per-injection-layer, like we do for the rainbow brackets query. With that, the only necessary change is to port the contents of `TextObjectQuery::capture_nodes_any` to a new function that uses `query_iter` and update callers. The callers end up being a bit cleaner: they only need to take `Syntax` now and not `LanguageConfiguration` and the root layer's root `tree_sitter::Node`. |
||
---|---|---|
.. | ||
src | ||
tests | ||
.gitignore | ||
Cargo.toml |