Open Mango0x45 opened 3 months ago
This only happens in one specific directory?
I'm not able to reproduce this and I'm not sure what could even be causing it especially without being able to reproduce it.
This only happens in one specific directory?
I'm not able to reproduce this and I'm not sure what could even be causing it especially without being able to reproduce it.
Yes, but I also only started using telescope today. I can try to copy my files to a different directory and see if the issue still persists in the copy.
If it does, I can upload a tarball of the directory to see if others can reproduce the issue
I wonder if it’s because Telescope creates a <esc><esc>
mapping:
So pressing <esc>
waits timeoutlen
ms before closing?
Strangely, I must first enter insert mode before invoking Telescope to see this <esc><esc>
. If I open nvim then Telescope without first going into insert mode, there is no <esc><esc>
.
This workaround seems to work:
vim.api.nvim_create_autocmd(‘BufEnter’, {
pattern = ‘*’,
callback = function()
vim.schedule(function() — without this, filetype is empty
if vim.api.nvim_buf_get_option(0, ‘filetype’) == ‘TelescopePrompt’ then
vim.keymap.set(‘I’, ‘<esc><esc>’, ‘’) — avoid E31 error
vim.keymap.del(‘I’, ‘<esc><esc>’)
end
end)
end,
})
Description
I am using telescope, and have
<Esc>
mapped to close telescope when I’m in insert mode. This works… but for whatever reason this has a very noticable delay (1 full second) in a very specific directory of mine which contains… a few 100 lines of C code.I have tested and confirmed that this has nothing to do with LSP or TreeSitter (I tried with
:LspStop
and:TSBufDisable <options>
). I also checked my mappings with:map <Esc>
and confirmed that I only have a single mapping, but that mapping is in normal mode (I am in insert mode), and even without it the delay persists.I am at a total loss as to how to further debug this.
Neovim version
Operating system and version
Arch Linux
Telescope version / branch / rev
commit 3a743491e5c6be0ed0aa8c31c6905df8f66179ba
checkhealth telescope
Steps to reproduce
Then I just do
:Telescope find_files
(or really any picker), and hit<Esc>
.Expected behavior
The picker to close instantly.
Actual behavior
The picker takes over a second.
Minimal config
(The issue also persists when using simply this minimal config)