diff options
author | Chris <[email protected]> | 2021-03-08 03:57:55 -0500 |
---|---|---|
committer | Chris <[email protected]> | 2021-03-08 03:57:55 -0500 |
commit | 9785c28407bd8e71f913ba2cb6fd61d0ab849c70 (patch) | |
tree | ec8f40d61170d8c34a11f1836aabef7136f6e37c | |
parent | 6ef04ed6cfbe1a1303f8e3fdccfa7a5980a41227 (diff) |
refactor thing
-rw-r--r-- | lua/config-telescope.lua | 55 |
1 files changed, 25 insertions, 30 deletions
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 = { - ["<C-j>"] = actions.move_selection_next, - ["<C-k>"] = actions.move_selection_previous, - -- To disable a keymap, put [map] = false - -- 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.select_horizontal, - - -- Add up multiple actions - ["<CR>"] = actions.select_default + actions.center, - - -- You can perform as many actions in a row as you like - -- ["<CR>"] = actions.select_default + actions.center + my_cool_custom_action, - }, - n = { - ["<C-j>"] = actions.move_selection_next, - ["<C-k>"] = actions.move_selection_previous, - -- ["<esc>"] = actions.close, - -- ["<C-i>"] = 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 = { + ["<C-j>"] = actions.move_selection_next, + ["<C-k>"] = actions.move_selection_previous, + -- To disable a keymap, put [map] = false + -- 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.select_horizontal, + + -- Add up multiple actions + ["<CR>"] = actions.select_default + actions.center, + + -- You can perform as many actions in a row as you like + -- ["<CR>"] = actions.select_default + actions.center + my_cool_custom_action, + }, + n = { + ["<C-j>"] = actions.move_selection_next, + ["<C-k>"] = actions.move_selection_previous, + -- ["<esc>"] = actions.close, + -- ["<C-i>"] = my_cool_custom_action, + }, + }, } } |