tags_live_grep: added support 'multiprocess=false'

main
bhagwan 2 years ago
parent ad4e168e99
commit 23267bfb8e

@ -147,10 +147,11 @@ M.live_grep_st = function(opts)
return get_grep_cmd(opts, query, true)
end
if opts.experimental and (opts.git_icons or opts.file_icons) then
opts._fn_transform = function(x)
return core.make_entry_file(opts, x)
end
if opts.requires_processing or opts.git_icons or opts.file_icons then
opts._fn_transform = opts._fn_transform
or function(x)
return core.make_entry_file(opts, x)
end
end
-- disable global resume

@ -200,15 +200,24 @@ local function tags(opts)
return
end
opts._fn_transform = make_entry.tag -- multiprocess=false
opts._fn_transform_str = [[return require("make_entry").tag]] -- multiprocess=true
-- prevents 'file|git_icons=false' from overriding processing
opts.requires_processing = true
opts._fn_transform = make_entry.tag -- multiprocess=false
opts._fn_transform_str = [[return require("make_entry").tag]] -- multiprocess=true
if opts.lgrep then
-- live_grep requested by caller ('tags_live_grep')
opts.prompt = '*' .. opts.prompt
opts.filename = opts._ctags_file
return require'fzf-lua.providers.grep'.live_grep_mt(opts)
if opts.multiprocess then
return require'fzf-lua.providers.grep'.live_grep_mt(opts)
else
-- 'live_grep_st' uses different signature '_fn_transform'
opts._fn_transform = function(x)
return make_entry.tag(opts, x)
end
return require'fzf-lua.providers.grep'.live_grep_st(opts)
end
end
opts._curr_file = opts._curr_file and

Loading…
Cancel
Save