Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce GrepperQuery highlight group #252

Merged
merged 2 commits into from
Aug 30, 2021
Merged

Conversation

jez
Copy link
Contributor

@jez jez commented Aug 29, 2021

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 that
links to String by default. This means that there should be no change by
default.

I have not written tests for this but I have tested it in my own
configuration files by adding this line:

hi link GrepperQuery Normal

As seen in the diff, there is prior art for introducing new highlighting
groups in grepper already--GrepperPrompt is a highlight group that
controls the color of everything before the > (which displays the search
program 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.

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
that links to `String` by default. This means that there should be no
change by default.

I have not written tests for this but I have tested it in my own
configuration files by adding this line:

```vim
hi link GrepperQuery Normal
```

As seen in the diff, there is prior art for introducing new highlighting
groups in grepper already--`GrepperPrompt` is a highlight group that
controls the color of everything before the `>` (which displays the
search program 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.
@lbonn lbonn merged commit 2b93535 into mhinz:master Aug 30, 2021
@lbonn
Copy link
Collaborator

lbonn commented Aug 30, 2021

Nice, thank you!

@jez jez deleted the jez-grepper-query branch August 30, 2021 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants