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

[Question] Is it possible to highlight matching part on buffer? #99

Open
rieje opened this issue Feb 26, 2023 · 0 comments
Open

[Question] Is it possible to highlight matching part on buffer? #99

rieje opened this issue Feb 26, 2023 · 0 comments

Comments

@rieje
Copy link

rieje commented Feb 26, 2023

Is it possible to highlight matching part on buffer? For example, I think Emacs's Swiper plugin has the best implementation of fuzzy finder search:

It highlights matching part on the buffer "preview" itself. This is more inline with how vim's / for incremental search works--highlights are on actual buffer where the context of the line matched is so where your eyes are already looking.


Completely unrelated, but seeing the previews on the existing buffer like in the video seems much more intuitive and space efficient than as a previewer via a floating window interface. The problem with the latter which AFAIK is what all plugins like Telescope, fzf-lua, etc. uses is the previewer needs to be configured to match the actual buffer as much as possible. If e.g. bat is used as the previewer, you don't get proper treesitter highlighting, the colorscheme might not be exactly the same, and you must explicitly set settings like line numbers to replicate what the actual buffer looks like. Why not just use the existing buffer as the previewer like the Swiper plugin--is there a limitation with Neovim where it can't do this? IMO something as simple as searching shouldn't require interacting with floating windows (even if they are maximized--the point is that you're leaving a more persistent window and buffer layout that you interact with vim 100% of the time for a temporary interface when it shouldn't be necessary).

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

No branches or pull requests

1 participant