Skip to content

Commit

Permalink
feat: add actions
Browse files Browse the repository at this point in the history
  • Loading branch information
phanen committed Mar 29, 2024
1 parent 14c545c commit 5a4872c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lua/fzf-lua-overlay/providers/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ return {
local name = selected[1]
vim.ui.open(lazy_cfg.plugins[name].url)
end,
['ctrl-l'] = function(selected)
if not selected or not selected[1] then
return
end
local name = selected[1]
require('fzf-lua').files { cwd = lazy_cfg.plugins[name].dir }
end,
['ctrl-n'] = function(selected)
if not selected or not selected[1] then
return
end
local name = selected[1]
require('fzf-lua').live_grep_native { cwd = lazy_cfg.plugins[name].dir }
end,
},
},
function(fzf_cb)
Expand Down
14 changes: 14 additions & 0 deletions lua/fzf-lua-overlay/providers/rtp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ return {
local path = selected[1]
require('fzf-lua-overlay.util').chdir(path)
end,
['ctrl-l'] = function(selected)
if not selected or not selected[1] then
return
end
local path = selected[1]
require('fzf-lua').files { cwd = path }
end,
['ctrl-n'] = function(selected)
if not selected or not selected[1] then
return
end
local path = selected[1]
require('fzf-lua').live_grep_native { cwd = path }
end,
},
},
function(fzf_cb)
Expand Down
14 changes: 14 additions & 0 deletions lua/fzf-lua-overlay/providers/zoxide.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ return {
local path = selected[1]:match '/.+'
require('fzf-lua-overlay.util').chdir(path)
end,
['ctrl-l'] = function(selected)
if not selected or not selected[1] then
return
end
local path = selected[1]:match '/.+'
require('fzf-lua').files { cwd = path }
end,
['ctrl-n'] = function(selected)
if not selected or not selected[1] then
return
end
local path = selected[1]:match '/.+'
require('fzf-lua').live_grep_native { cwd = path }
end,
},
},
'zoxide query -ls',
Expand Down

0 comments on commit 5a4872c

Please sign in to comment.