Introduce GrepperQuery highlight group #252
Merged
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.
The behavior changed in this commit: 8b78347. The decision was to
unconditionally highlight the query like the user's colorscheme highlights
string literals.
I'd like to be able to customize this without changing how all string
literals look, so I've introduced a new
GrepperQuery
highlight group thatlinks to
String
by default. This means that there should be no change bydefault.
I have not written tests for this but I have tested it in my own
configuration files by adding this line:
As seen in the diff, there is prior art for introducing new highlighting
groups in grepper already--
GrepperPrompt
is a highlight group thatcontrols the color of everything before the
>
(which displays the searchprogram and flags). There do not appear to be any tests for that feature
either, otherwise I would have cargo culted some to test this feature.