-
-
Notifications
You must be signed in to change notification settings - Fork 856
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
feat: add git_live_grep #1974
feat: add git_live_grep #1974
Conversation
git_grep is to live_grep what git_files is to find_files.
@Conni2461 maybe that could be its own separate plugin ?
What do you think ? |
I wanted to argue that this doesn't really need to be in telescope core. Its already somewhat possible with this, there are just no supported shorthands and we dont have git cwd detection.
If you want to make an extension feel free, we already argued for this some time ago anyway 😆 see #1228 |
@Conni2461 got it. Another issue is the fact that Long story short: I will create an extension. Thanks for the excellent plugin ❤️ |
I think this can be done with any sorter. See You then can pass a opt We can even argue that we should make that default for those. If that works, PR welcome :) |
@Conni2461 it does not work for me, here is what I tried: local tiebreak = function() return false end
opts.defaults.tiebreak = tiebreak;
opts.tiebreak = tiebreak; After reading the help, it seems not to do what I want. local sorter_preserve_order = function(opts)
opts = opts or {}
local fzy = opts.fzy_mod or require "telescope.algos.fzy"
return sorters.Sorter:new {
scoring_function = function(_, prompt, line, _)
if not fzy.has_match(prompt, line) then
return -1
end
return 1
end,
highlighter = function(_, prompt, display)
return fzy.positions(prompt, display)
end,
}
end |
git_live_grep is to live_grep what git_files is to find_files.