From 9785c28407bd8e71f913ba2cb6fd61d0ab849c70 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 8 Mar 2021 03:57:55 -0500 Subject: refactor thing --- lua/config-telescope.lua | 55 ++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 30 deletions(-) (limited to 'lua') diff --git a/lua/config-telescope.lua b/lua/config-telescope.lua index c1f8adfd..d8e38ca8 100644 --- a/lua/config-telescope.lua +++ b/lua/config-telescope.lua @@ -1,35 +1,6 @@ local actions = require('telescope.actions') -- Global remapping ------------------------------ -require('telescope').setup{ - defaults = { - mappings = { - i = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - -- To disable a keymap, put [map] = false - -- So, to not map "", just put - -- [""] = false, - - -- Otherwise, just set the mapping to the function that you want it to be. - -- [""] = actions.select_horizontal, - - -- Add up multiple actions - [""] = actions.select_default + actions.center, - - -- You can perform as many actions in a row as you like - -- [""] = actions.select_default + actions.center + my_cool_custom_action, - }, - n = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - -- [""] = actions.close, - -- [""] = my_cool_custom_action, - }, - }, - } -} - -- '--color=never', require('telescope').setup{ defaults = { @@ -76,6 +47,30 @@ require('telescope').setup{ qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, -- Developer configurations: Not meant for general override - buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker + buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker, + mappings = { + i = { + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + -- To disable a keymap, put [map] = false + -- So, to not map "", just put + -- [""] = false, + + -- Otherwise, just set the mapping to the function that you want it to be. + -- [""] = actions.select_horizontal, + + -- Add up multiple actions + [""] = actions.select_default + actions.center, + + -- You can perform as many actions in a row as you like + -- [""] = actions.select_default + actions.center + my_cool_custom_action, + }, + n = { + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + -- [""] = actions.close, + -- [""] = my_cool_custom_action, + }, + }, } } -- cgit v1.2.3