summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authoranott03 <amitav_nott@ryecountryday.org>2021-01-27 11:22:11 -0500
committerGitHub <noreply@github.com>2021-01-27 17:22:11 +0100
commit5995a8be8faaa2c6e8693ca52f2320cb4a80e3fa (patch)
treea3fe0a4f64074a1834df3b80e1445cb725b9fdb1 /README.md
parentccbb7f56384921a81813f0f9ebc85cdba0b7c255 (diff)
Undo #465 (#469)
We have broke all extension that do some sort of goto_file_selection:replace Problem described here: https://github.com/nvim-telescope/telescope.nvim/pull/465#issuecomment-767831897 Possible solution: https://github.com/nvim-telescope/telescope.nvim/pull/465#issuecomment-767808213
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/README.md b/README.md
index 4f28634..1e89c5a 100644
--- a/README.md
+++ b/README.md
@@ -278,11 +278,11 @@ require('telescope').setup{
-- So, to not map "<C-n>", just put
["<c-x>"] = false,
-- Otherwise, just set the mapping to the function that you want it to be.
- ["<C-i>"] = actions.hselect,
+ ["<C-i>"] = actions.goto_file_selection_split,
-- Add up multiple actions
- ["<CR>"] = actions.select + actions.center,
+ ["<CR>"] = actions.goto_file_selection_edit + actions.center,
-- You can perform as many actions in a row as you like
- ["<CR>"] = actions.select + actions.center + my_cool_custom_action,
+ ["<CR>"] = actions.goto_file_selection_edit + actions.center + my_cool_custom_action,
},
n = {
["<esc>"] = actions.close
@@ -303,7 +303,7 @@ local actions = require('telescope.actions')
require('telescope.builtin').fd({ -- or new custom picker's attach_mappings field:
attach_mappings = function(prompt_bufnr)
-- This will replace select no mather on which key it is mapped by default
- actions.select:replace(function()
+ actions.goto_file_selection_edit:replace(function()
local entry = actions.get_selected_entry()
actions.close(prompt_bufnr)
print(vim.inspect(entry))
@@ -311,17 +311,17 @@ require('telescope.builtin').fd({ -- or new custom picker's attach_mappings fiel
end)
-- You can also enhance an action with pre and post action which will run before of after an action
- actions.hselect:enhance ({
+ actions.goto_file_selection_split:enhance ({
pre = function()
- -- Will run before actions.hselect
+ -- Will run before actions.goto_file_selection_split
end,
post = function()
- -- Will run after actions.hselect
+ -- Will run after actions.goto_file_selection_split
end,
})
-- Or replace for all commands: edit, new, vnew and tab
- actions._select:replace(function(_, cmd)
+ actions._goto_file_selection:replace(function(_, cmd)
print(cmd) -- Will print edit, new, vnew or tab depending on your keystroke
end)
@@ -340,20 +340,20 @@ require('telescope.builtin').fd({ -- or new custom picker's attach_mappings fiel
<!-- sorter = sorters.fuzzy_with_index_bias(), -->
<!-- attach_mappings = function(prompt_bufnr) -->
<!-- -- This will replace select no mather on which key it is mapped by default -->
-<!-- actions.select:replace(function() -->
+<!-- actions.goto_file_selection_edit:replace(function() -->
<!-- -- Code here -->
<!-- end) -->
<!-- -- You can also enhance an action with post and post action which will run before of after an action -->
-<!-- actions.hselect:enhance { -->
+<!-- actions.goto_file_selection_split:enhance { -->
<!-- pre = function() -->
-<!-- -- Will run before actions.hselect -->
+<!-- -- Will run before actions.goto_file_selection_split -->
<!-- end, -->
<!-- post = function() -->
-<!-- -- Will run after actions.hselect -->
+<!-- -- Will run after actions.goto_file_selection_split -->
<!-- end, -->
<!-- } -->
<!-- -- Or replace for all commands: edit, new, vnew and tab -->
-<!-- actions._select:replace(function(_, cmd) -->
+<!-- actions._goto_file_selection:replace(function(_, cmd) -->
<!-- print(cmd) -- Will print edit, new, vnew or tab depending on your keystroke -->
<!-- end) -->
<!-- return true -->