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

feat: adds-option-entryseparatorhl #3139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MovieMaker93
Copy link
Contributor

Description

Adds option to configure the highlight of the result separator with new hl group: TelescopeResultsEntrySeparator

Fixes #3117

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I've tested it by changing both the foreground and background of the new hlgroup: TelescopeResultsEntrySeparator
First test by changing the background:
:hi TelescopeResultsEntrySeparator guibg=#7f1425
image
Second test by changing the foreground:
:hi TelescopeResultsEntrySeparator guifg=#7f1425
image

Configuration:

  • Neovim version (nvim --version): NVIM v0.10.0
  • Operating system and version: win 11

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

lua/telescope/pickers.lua Outdated Show resolved Hide resolved
@MovieMaker93 MovieMaker93 force-pushed the feat-adds-option-entryseparatorhl branch from 0bc170b to 4c7d616 Compare May 27, 2024 11:43
@Conni2461
Copy link
Member

Conni2461 commented May 27, 2024

this now has a new behavior

now

image

before

image

i'm not sure i like it

@MovieMaker93
Copy link
Contributor Author

this now has a new behavior

now

image

before

image

i'm not sure i like it

I don't know if I like it more. Is there a cleaner way to allow users to change the separator highlight while keeping the actual default behaviour?

@Conni2461
Copy link
Member

Is there a cleaner way to allow users to change the separator highlight while keeping the actual default behaviour?

but its not, we are losing the selected row highlighting because the selection is rendered before, i am not sure.

None the less for me it looks like a breaking change

@jamestrew
Copy link
Contributor

I think the selection highlight is applied later after but the way extmark handles highlight combining is what's leading to this outcome.

There is a hl_mode option for nvim_buf_set_extmark that might be able to control this but it currently only works for virt_text extmarks. I don't have a good solution for this. Maybe it's not currently doable in a non-breaking change manner.

This doesn't affect me personally but I could see this being a pretty annoying breaking change to some.

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.

telescope results line color / highlight
3 participants