fix(telescope): keep current prompt when switching to hidden/no_ignore

This commit is contained in:
Folke Lemaitre 2023-05-18 09:45:59 +02:00
parent 080ea29354
commit 78354a1e5e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -166,10 +166,14 @@ return {
return require("trouble.providers.telescope").open_selected_with_trouble(...)
end,
["<a-i>"] = function()
Util.telescope("find_files", { no_ignore = true })()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { no_ignore = true, default_text = line })()
end,
["<a-h>"] = function()
Util.telescope("find_files", { hidden = true })()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { hidden = true, default_text = line })()
end,
["<C-Down>"] = function(...)
return require("telescope.actions").cycle_history_next(...)