-
-
Notifications
You must be signed in to change notification settings - Fork 842
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
live_grep_raw #670
live_grep_raw #670
Conversation
@jesseleite do you need any help here? |
Not ignoring Conni here! We chatted in gitter. I just need to find the time to dig in again, will do soon 😅 |
Ripgrep has the '--json' option which returns the matches to be highlighted. Might be very useful If you haven't consider it. @jesseleite |
@muniter Oh interesting, will check it out thanks! |
@jesseleite, are you planning to continue working on it? |
@Shatur I am, but we just had a baby, and @tjdevries told me it might be good to wait for all the async stuff he's working on to be merged in. |
PS. I got asyncing feeling that some people will misinterpret that last comment. @tjdevries and I dadn't have a baby; My wife and I had a baby. |
Hey @jesseleite, I've had some time to look at this and it's great. Your code is using |
Because I really need the option passing parameters to grep I created an extension based on this PR: https://github.com/nvim-telescope/telescope-live-grep-raw.nvim @tjdevries as mentioned in #1228 telescope should be separated into smaller pieces for a better workload balance of the contributors. I would be happy moving this plugin to the |
@weeman1337 I can also move your project into this organization |
@Conni2461 cool ✓ I will directly close my project afterwards |
@weeman1337 are you planning to move your project to the organization? |
That is my plan. But I cannot do that on my own ;) |
If you give me access to your repo i can do it. Or i create your a new repo here and i give you access and you push your repo to that remote. Whatever you prefer 😆 |
The new extension has been moved to the Telescope project: |
So can we close this PR then? |
I apologize for letting this go so long. Just trying the extension now, very cool! If @weeman1337 is up for maintaining this as an extension, I'm cool with closing my PR 👍 That said, the extension doesn't quite work to the spec I was going for. A couple things I noticed off the bat...
Thoughts? |
I'd rather see that work done in the other repo, rather than here. I think it makes more sense to focus these cooler and more powerful pickers in dedicated locations, instead of trying to maintain support in the core repo. I am trying to push more things out into extensions because there are already too many things in the core repo for me to maintain |
@jesseleite I got the highlighting working using code to convert color codes to highlighting but it was a complete mess. The better option would probably be to take a 1st run which strips the codes and you'd be able to make any adjustments. Then the highlights would have the correct location. But that means parsing the output twice. What I'd much prefer is if there was something built into telescope which attached highlights to a part of the final string so the highlight code could take care of any adjustments made to shorten paths for example. JSON would be great in terms of finding the data, but I'm worried it would make a huge difference to the size of data we get back from |
Sounds good Teej 👍 |
<3 |
I proposed this idea on the Telescope Gitter, and there seemed to be interest from fearless leader @tjdevries, among others. The idea is to port vim-agriculture's functionality into a
live_grep_raw
Telescope finder.Behaviour
live_grep
finder, but would not escape user input, allowing regex search by default:func.*someFunc
-u "func.*someFunc" vendor
2 / 6
or0 / 0
) at the right side of the prompt.0 / 0
result count with anError
stringExample
Todo
rg
andag
by default.rg
by default.vimgrep_arguments = {'ag', '--nogroup', '--column'}
to useag
.