neovim: <esc> should exit telescope immediately
This commit is contained in:
parent
b520597a52
commit
af200b99ed
1 changed files with 33 additions and 22 deletions
|
@ -5,7 +5,11 @@ return {
|
|||
},
|
||||
{
|
||||
"telescope.nvim",
|
||||
opts = {
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = {
|
||||
|
@ -20,6 +24,12 @@ return {
|
|||
height = 0.9,
|
||||
preview_cutoff = 10,
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = actions.close, -- <Esc> close popup
|
||||
["<C-u>"] = false, -- <C-u> clear prompt
|
||||
},
|
||||
},
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
wrap_results = true,
|
||||
|
@ -28,6 +38,7 @@ return {
|
|||
hide_on_startup = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue