Is it possible to assign a function to keymaps in Lspsaga finder config ? #1495
Unanswered
eshepelyuk
asked this question in
Q&A
Replies: 2 comments
-
Proposed a possible solution in the finder tool #1523 if you'd like to weigh in. |
Beta Was this translation helpful? Give feedback.
0 replies
-
After for poking around there is a way to achieve that behavior with the existing APIs. First, you will need to define a custom command like the following: vim.api.nvim_create_user_command(
"MyCustomCommand",
function (opts)
local filepath = opts.fargs[1]
print("MyCustomCommand filepath=", filepath)
end,
{
nargs = 1,
complete = "file",
}
) Then in the setup you can use the following: require('lspsaga').setup({
finder = {
keys = {
"open_or_toggle" = "p",
"MyCustomCommand" = "o",
},
},
}) That will fire your custom command function if you press |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
I would like to use this plugin https://github.com/nvim-focus/focus.nvim to open LSP references files
insted of using native
split
.Is it possible to assign a function to
finder.keys
so I could call other plugin funcions.Smth like
Beta Was this translation helpful? Give feedback.
All reactions