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

[Feature Request] Make search marks independent of hlslens #5

Open
tbung opened this issue Jan 7, 2022 · 1 comment · May be fixed by #30
Open

[Feature Request] Make search marks independent of hlslens #5

tbung opened this issue Jan 7, 2022 · 1 comment · May be fixed by #30
Labels
enhancement New feature or request

Comments

@tbung
Copy link
Contributor

tbung commented Jan 7, 2022

I think it would be quite possible to implement showing search results right in this plugin without requiring installing another plugin (that also overwrites n mappings). The only requirements I could imagine to do this would be plenary.nvim for async stuff (a plugin most people should have installed anyway, since a lot of plugins require it including telescope) and an external search program, preferably ripgrep but grep should do.

An example implementation could be how todo-comments.nvim does it: https://github.com/folke/todo-comments.nvim/blob/main/lua/todo-comments/search.lua

One could then use the / register to get the last searched pattern. Since this works asynchronously and potentially uses rg it should be reasonably fast without touching the native search functionality.

@petertriho
Copy link
Owner

This looks like a good idea (I'll probably look into support both ways)

@petertriho petertriho added the enhancement New feature or request label Jan 8, 2022
@tbung tbung linked a pull request Jan 10, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants