Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions lua/lspsaga/finder/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -438,16 +438,31 @@ function fd:apply_maps()
if inexist and (action == 'split' or action == 'vsplit') then
local reuse = box.win_reuse(action)
if not reuse then
vim.cmd[action](fname)
if (config.finder.actions or {})[action] then
config.finder.actions[action](fname)
else
vim.cmd[action](fname)
end
else
api.nvim_win_set_buf(reuse, fn.bufadd(fname))
api.nvim_set_current_win(reuse)
end
else
vim.cmd[action](fname)
if (config.finder.actions or {})[action] then
config.finder.actions[action](fname)
else
vim.cmd[action](fname)
end
end
restore()
api.nvim_win_set_cursor(0, pos)
xpcall(
function ()
api.nvim_win_set_cursor(0, pos)
end,
function (err)
print(err.message)
end
)
beacon({ pos[1] - 1, 0 }, #api.nvim_get_current_line())
return
end
Expand Down
1 change: 1 addition & 0 deletions lua/lspsaga/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ local default_config = {
quit = 'q',
close = '<C-c>k',
},
actions = {},
},
definition = {
width = 0.6,
Expand Down