mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-08-16 02:45:09 +00:00
feat: Add git builtins (#240)
Conni2461 is a great coder and contributor :)
This commit is contained in:
@@ -134,7 +134,7 @@ do
|
||||
end
|
||||
|
||||
local execute_keys = {
|
||||
path = function(t)
|
||||
path = function(t)
|
||||
return t.cwd .. path.separator .. t.filename, false
|
||||
end,
|
||||
|
||||
@@ -215,6 +215,24 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
function make_entry.gen_from_git_commits(opts)
|
||||
opts = opts or {}
|
||||
|
||||
return function(entry)
|
||||
if entry == "" then
|
||||
return nil
|
||||
end
|
||||
|
||||
local sha, msg = string.match(entry, '([^ ]+) (.+)')
|
||||
|
||||
return {
|
||||
value = sha,
|
||||
ordinal = sha .. ' ' .. msg,
|
||||
display = sha .. ' ' .. msg,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function make_entry.gen_from_quickfix(opts)
|
||||
opts = opts or {}
|
||||
opts.tail_path = get_default(opts.tail_path, true)
|
||||
|
||||
Reference in New Issue
Block a user