Closed macintacos closed 3 years ago
@macintacos For now, this is not possible. But I think it is a good idea. I will look into it to add custom methods with optional pre- and post methods.
For now you could do this (temporary) manually by:
use '~/projects/_repos/telescope-zoxide
b. Save: :w
c. Reload currently changed file: :luafile %
d. Install package: :PackerInstall
vim.cmd("Prosession .")
after list.lua#L114Note: Above is not testes, so some steps could have faults
@macintacos I added new functionality to add, extend and update Telescope Zoxide config including mappings. You can try this on the current feature branch feature/add-user-configuration. I will merge this shortly after some testing.
Your requested functionality can now be achieved by adding the following setup:
require("telescope._extensions.zoxide.config").setup({
mappings = {
default = {
after_action = function(selection)
vim.cmd("Prosession " .. selection.path)
end
}
}
})
Or using the supplied helper function:
local z_utils = require("telescope._extensions.zoxide.utils")
require("telescope._extensions.zoxide.config").setup({
mappings = {
default = { after_action = z_utils.create_basic_command("Prosession") },
}
})
That's fantastic, thanks!
PR merged. telescope-zoxide
can now be optionally configured.
I would like to execute
:Prosession .
after I hit<CR>
on a list item after running:Telescope zoxide list
. How do I do that automatically?