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

Highlight matching words in previewers #933

Closed
liubog2008 opened this issue Jun 24, 2021 · 4 comments · Fixed by #2611
Closed

Highlight matching words in previewers #933

liubog2008 opened this issue Jun 24, 2021 · 4 comments · Fixed by #2611
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@liubog2008
Copy link

liubog2008 commented Jun 24, 2021

Now only the line is highlighted.

@liubog2008 liubog2008 added the enhancement Enhancement to performance, inner workings or existent features label Jun 24, 2021
@Conni2461
Copy link
Member

We currently dont do anything with a column in any picker. But for the future we can. So if the the picker provides a column (and maybe col_width) we could make this possible but if not i think line highlighting is enough. Shouldn't be hard to implement we just need to make sure we arn't breaking builtins that do not provide it.

pcall(vim.api.nvim_buf_add_highlight, bufnr, ns_previewer, "TelescopePreviewLine", lnum - 1, 0, -1)

We would need to change this to something like this:

if col and col_width then
  pcall(vim.api.nvim_buf_add_highlight, bufnr, ns_previewer, "TelescopePreviewLine", lnum - 1, col - 1, col + col_width + 1)
else
  pcall(vim.api.nvim_buf_add_highlight, bufnr, ns_previewer, "TelescopePreviewLine", lnum - 1, 0, -1)
end

or similar

@DasGandlaf
Copy link

DasGandlaf commented Nov 8, 2022

Any news on this? I would prefer it this way actually. Or better yet, highlight the whole line with a background color, and highlight the colums with the text color, or something like that.

@416207298
Copy link

By the way, I would like to know how to change the color of matching word?
image

@416207298
Copy link

By the way, I would like to know how to change the color of matching word? image

Sorry to ask so beginner question, I found the hl group, which is TelescopeMatching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants