Skip to content

<Esc> functionality issue #573

@AntoineGS

Description

@AntoineGS

Moving us to another thread since I think they are different issues.
What happens if you change the keymap to the following?

vim.keymap.set('n', '<Esc>', function()
  vim.cmd.nohlsearch()
end)

Edit
Ok now it works for some reason, I don't know what happened there. I restarted my nvim a few times and now everything seems to be good...

Nope, it's still acting up. Seems to be happening more often when searching for something and pressing <Esc> right after opening a new nvim instance and then quickly opening a file. I can't seem to consistently reproduce this... (I'm going to bed now, might be able to look into this more tomorrow)


Hmm, it now errors with the following (doing the same steps as in my original comment, searching for something and pressing <Esc>)

E5108: Error executing lua: .../nvim/lazy/telescope.nvim/lua/telescope/actions/init.lua:381: attempt to index local 'picker' (a nil value)
stack traceback:
	.../nvim/lazy/telescope.nvim/lua/telescope/actions/init.lua:381: in function 'run_replace_or_original'
	...re/nvim/lazy/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
	...hare/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:293: in function 'value'
	...share/nvim/lazy/copilot.lua/lua/copilot/keymaps/init.lua:77: in function <...share/nvim/lazy/copilot.lua/lua/copilot/keymaps/init.lua:62>

Not sure if this is an issue on copilot.lua's end, telescope's, or my config, based on the stack trace

Originally posted by @JulienZD in #570

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions