nvim: for telescope: add keymap <esc> for close

This commit is contained in:
inkch 2024-01-17 11:21:41 +09:00
parent d8461b6aa9
commit 09db90af39

View File

@ -2,6 +2,15 @@ return {
'nvim-telescope/telescope.nvim', tag = '0.1.5', 'nvim-telescope/telescope.nvim', tag = '0.1.5',
dependencies = { 'nvim-lua/plenary.nvim' }, dependencies = { 'nvim-lua/plenary.nvim' },
config = function() config = function()
local actions = require("telescope.actions")
require('telescope').setup({
defaults = {
mappings = {
i = { ["<esc>"] = actions.close },
},
},
})
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>\'', builtin.marks, {}) vim.keymap.set('n', '<leader>\'', builtin.marks, {})
vim.keymap.set('n', '<leader>.', builtin.find_files, {}) vim.keymap.set('n', '<leader>.', builtin.find_files, {})