nvim-telescope / telescope-live-grep-args.nvim

Live grep with args
727 stars 40 forks source link

`telescope-live-grep-raw.nvim` vs `telescope-rg.nvim`? #8

Closed jesseleite closed 2 years ago

jesseleite commented 2 years ago

I see this repo was renamed from telescope-live-grep-raw.nvim to telescope-rg.nvim...

Technically, live_grep_raw should work with other search tools like ag instead of rg if the user sets their vimgrep options to suit, right?

Also, if the extension is loaded via load_extension('live_grep_raw'), doesn't it make more sense to use that terminology in the repo name as well?

weeman1337 commented 2 years ago

As far as I understood the idea was building it specifically for rg:
See https://github.com/nvim-telescope/telescope-rg.nvim/issues/5

The README is not up to date. I am going to change this later with #7 .

jesseleite commented 2 years ago

Ah sorry, didn't see that convo. Commented over there too!

weeman1337 commented 2 years ago

Let's carry the discussion over here: Should it be renamed once again?
Is it possible naming it live_grep at all? Because that collides with live_grep in Telescope β€žcoreβ€œ.

@Conni2461 @tjdevries

jesseleite commented 2 years ago

Whoops, it moved again lol. I just commented over there again, sorry!

weeman1337 commented 2 years ago

We can name it live_grep and move it out with an announcement here nvim-telescope/telescope.nvim#1470 .

tjdevries commented 2 years ago

hmmm, I don't know if we need to move live_grep out. This could change to rg_live or live_rg or something.

I particularly don't want this plugin (telescope-rg) to even consider what would work for other grep services. It complicates everything, obscures easy names, etc. It has been quite annoying to maintain three or more "grep-like" alternatives for various aspects. So don't worry about that in this plugin.

jesseleite commented 2 years ago

I don't know if we need to move live_grep out

Are all the builtins eventually getting moved out, as per this discussion?

This could change to rg_live or live_rg or something

@tjdevries Two quick thoughts on this...

1) This extension isn't coupled to rg; It's coupled to whatever the user's vimgrep_arguments happen to be.

2) What if we rename this repo/extension to live_grep_args?

- If this extension allows the user to `live_grep` with their own `args`, why not `live_grep_args` ? πŸ™‚

- This would address my concern above about coupling the name to `rg`; Again, both `live_grep` and `live_grep_args` happen to use `rg` by default, but only because of what's in the default `vimgrep_arguments`.

Don't want to die on the hill though. Just my two cents ❀️

lobre commented 2 years ago

If vimgrep_arguments are set to something like rg --files, it also means this can be used as a find_files replacement, adding support to rg flags.

Taking that into account, I feel that having live_grep in the name would not necessarily make sense neither?

That is just a thought, but effectively the native live_grep in telescope can also be configured with rg --files. I am wondering what is the technical difference behind the scenes between live_grep and find_files then (apart from setting the default rg flags).

weeman1337 commented 2 years ago

Coming back to this @Conni2461 should we rename it one last time to live_grep? Alternatively live_grep_args to avoid confusion with the builtin.

I would then update the code and docs.

jesseleite commented 2 years ago

He's alive! ^ My vote is live_grep_args, since it's basically live_grep with ability to pass args πŸŽ‰

Conni2461 commented 2 years ago

Please not live_grep this will be a name clash with current live_grep. Off the top of my head i don't know what will prioritized extension or builtin when using :Telescope

live_grep_args works for me.

weeman1337 commented 2 years ago

Go live_grep_args! :partying_face:

Conni2461 commented 2 years ago

Do i have to do something?

Want to prep a PR that changes the references inside the repo and i merge and rename at the same time, if you dont have the permissions to rename

Something i am not sure about is that telescope.load(" ... ") will change if we change the dir name. This is a breaking change

weeman1337 commented 2 years ago

I am going to prepare a PR. I am planning to display a notice to the users if they are using one of the previous names.

jesseleite commented 2 years ago

πŸŽ‰