piersolenski / telescope-import.nvim

Import modules with ease
186 stars 8 forks source link

feat: add syntax highlighting to picker results #19

Closed chrisgrieser closed 8 months ago

chrisgrieser commented 9 months ago

example how it looks now:

Pasted image 2023-12-07 at 16 04 16@2x

piersolenski commented 8 months ago

I had considered doing this originally, however it does make it less obvious as to what is being matched via the fuzzy searching. Ideally it would be great to have both, but I'm not sure if that is possible?

chrisgrieser commented 8 months ago

Sure, that's doable. As colors can vary greatly between different themes, I simply went for reverse, as it's discernible everywhere. If standing out too much, underline could maybe also work? Pasted image 2024-01-07 at 20 55 12@2x

piersolenski commented 8 months ago

Dope! I like using colour over underlines to keep it similar to how the default Telescope behaviour works - we just need to make sure the highlight is compatible with other themes!

chrisgrieser commented 8 months ago

Yeah, the issue with a color is that it might be not very visible in certain themes. That's why I used reverse. It will always be discernible in every theme.

(Already added in the last commit ready to merge - didn't mention that the screenshot wasn't a proposal but already a showcase of the finished implementation 😅 )

piersolenski commented 8 months ago

This is great, thanks!