support using ; extends in a new read_query_extends fn
#30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
makes a new function
read_query_extends, that is similar toread_query, but it takes a closure that returns an Iterator of Strings in order of priority, and uses that to handle; extendsdirectives, going down one level of priority for each directive.the
; extendsdirective makes it, so that you can define custom queries without having to copy all of the existing ones, by just doing; extendsin your file and then writing your own custom queries.this is the part on the tree-house side to address helix-editor/helix#14950. i have also made a branch on helix, that shows this in use: https://github.com/m4rch3n1ng/helix/tree/queries-extend.
(note: i didn't change what
read_querydoes and instead added a new function for backwards compatability)