From d7c02e3b52b5a13265e071d0de2d6a989110a515 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Mon, 22 Feb 2021 11:30:57 -0500 Subject: feat: Action improvements (#472) * feat: replace_map * feat: Add action_set and action_state * fix: Move all actions.get_ to action_state.get_ * fix: replace all internal references of _goto_file_selection_edit * feat: add some docs * fix: lint * feat: actions.select * remove mentions and usage of goto_file_selection APIs * feat: special case attach_mappings to be overridable and defaultable * Having goto_file_selection mappings will cause a error as well as replacing deprecated goto_file_selection methodes For config and replacing use this instead: - actions.select_default - actions.select_horizonal - actions.select_vertical - actions.select_tab Only replacing: - actions.set.edit -- for replacing all select functions * adds actions.state.select_key_to_edit_key Co-authored-by: Simon Hauser --- lua/telescope/WIP.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua/telescope/WIP.lua') diff --git a/lua/telescope/WIP.lua b/lua/telescope/WIP.lua index f6dac64..cacb438 100644 --- a/lua/telescope/WIP.lua +++ b/lua/telescope/WIP.lua @@ -1,6 +1,7 @@ local make_entry = require('telescope.make_entry') local actions = require('telescope.actions') +local action_state = require('telescope.actions.state') local finders = require('telescope.finders') local previewers = require('telescope.previewers') local pickers = require('telescope.pickers') @@ -70,7 +71,7 @@ WIP.reloader = function(opts) attach_mappings = function(prompt_bufnr, map) local reload_package = function() - local selection = actions.get_selected_entry(prompt_bufnr) + local selection = action_state.get_selected_entry(prompt_bufnr) actions.close(prompt_bufnr) -- cgit v1.2.3