keys = {
{ '<C-_>', '<CMD>Telescope current_buffer_fuzzy_find sorting_strategy=ascending<CR>' },
{ '<C-r>', '<CMD>Telescope command_history<CR>' },
- { '<leader>b', '<CMD>Telescope buffers<CR>' },
- { '<leader>l', '<CMD>Telescope diagnostics<CR>' },
- { '<leader>R', '<CMD>Telescope lsp_references<CR>' },
- { '<leader>tt', '<CMD>Telescope resume<CR>' },
- { '<leader>tc', '<CMD>Telescope commands<CR>' },
- { '<leader>th', '<CMD>Telescope help_tags<CR>' },
- { '<leader>tm', '<CMD>Telescope marks<CR>' },
- { '<leader>tq', '<CMD>Telescope quickfix<CR>' },
- { '<leader>ts', '<CMD>Telescope search_history<CR>' },
- { '<leader>tr', '<CMD>Telescope registers<CR>' },
- { '<leader>tk', '<CMD>Telescope keymaps<CR>' },
- { '<leader>to', '<CMD>Telescope vim_options<CR>' },
- { '<leader>tgc', '<CMD>Telescope git_commits<CR>' },
- { '<leader>tgd', '<CMD>Telescope git_bcommits<CR>' },
- { '<leader>tgb', '<CMD>Telescope git_branches<CR>' },
- { '<leader>tgs', '<CMD>Telescope git_status<CR>' },
- { '<leader>tft', '<CMD>Telescope filetypes<CR>' },
- { '<leader>tld', '<CMD>Telescope lsp_type_definitions<CR>' },
- { '<leader>tlt', '<CMD>Telescope lsp_definitions<CR>' },
- { '<leader>tli', '<CMD>Telescope lsp_implementations<CR>' },
- { '<leader>tls', '<CMD>Telescope lsp_document_symbols<CR>' },
- { '<leader>tlS', '<CMD>Telescope lsp_workspace_symbols<CR>' },
+ { '<LEADER>b', '<CMD>Telescope buffers<CR>' },
+ { '<LEADER>l', '<CMD>Telescope diagnostics<CR>' },
+ { '<LEADER>R', '<CMD>Telescope lsp_references<CR>' },
+ { '<LEADER>tt', '<CMD>Telescope resume<CR>' },
+ { '<LEADER>tc', '<CMD>Telescope commands<CR>' },
+ { '<LEADER>th', '<CMD>Telescope help_tags<CR>' },
+ { '<LEADER>tm', '<CMD>Telescope marks<CR>' },
+ { '<LEADER>tq', '<CMD>Telescope quickfix<CR>' },
+ { '<LEADER>ts', '<CMD>Telescope search_history<CR>' },
+ { '<LEADER>tr', '<CMD>Telescope registers<CR>' },
+ { '<LEADER>tk', '<CMD>Telescope keymaps<CR>' },
+ { '<LEADER>to', '<CMD>Telescope vim_options<CR>' },
+ { '<LEADER>tgc', '<CMD>Telescope git_commits<CR>' },
+ { '<LEADER>tgd', '<CMD>Telescope git_bcommits<CR>' },
+ { '<LEADER>tgb', '<CMD>Telescope git_branches<CR>' },
+ { '<LEADER>tgs', '<CMD>Telescope git_status<CR>' },
+ { '<LEADER>tft', '<CMD>Telescope filetypes<CR>' },
+ { '<LEADER>tld', '<CMD>Telescope lsp_type_definitions<CR>' },
+ { '<LEADER>tlt', '<CMD>Telescope lsp_definitions<CR>' },
+ { '<LEADER>tli', '<CMD>Telescope lsp_implementations<CR>' },
+ { '<LEADER>tls', '<CMD>Telescope lsp_document_symbols<CR>' },
+ { '<LEADER>tlS', '<CMD>Telescope lsp_workspace_symbols<CR>' },
},
config = function()
+ local actions = require('telescope.actions')
require('telescope').setup {
defaults = {
layout_strategy = 'horizontal',
width = 0.9,
},
mappings = {
- i = { ["<ESC>"] = require('telescope.actions').close },
+ i = {
+ ['<ESC>'] = actions.close,
+ ['<C-d>'] = actions.delete_buffer + actions.move_to_top,
+ ['<C-j>'] = actions.move_selection_next,
+ ['<C-k>'] = actions.move_selection_previous,
+ },
},
},
pickers = {},
{
'tpope/vim-fugitive',
keys = {
- { '<leader>gg', '<CMD>Git<CR>' },
- { '<leader>gc', '<CMD>Git commit<CR>' },
- { '<leader>ga', '<CMD>Git add %<CR>' },
- { '<leader>gd', '<CMD>Gdiffsplit<CR>' },
- { '<leader>gb', '<CMD>Git blame<CR>' },
- { '<leader>gp', '<CMD>Git push<CR>' },
+ { '<LEADER>gg', '<CMD>Git<CR>' },
+ { '<LEADER>gc', '<CMD>Git commit<CR>' },
+ { '<LEADER>ga', '<CMD>Git add %<CR>' },
+ { '<LEADER>gd', '<CMD>Gdiffsplit<CR>' },
+ { '<LEADER>gb', '<CMD>Git blame<CR>' },
+ { '<LEADER>gp', '<CMD>Git push<CR>' },
},
},
}