jdhao / nvim-config

A modern Neovim configuration with full battery for Python, Lua, C++, Markdown, LaTeX, and more...
MIT License
3.4k stars 502 forks source link

Double ESC Needed to Escape Insert Mode after Completion Starts #264

Open despdx opened 7 months ago

despdx commented 7 months ago

Describe the bug

I immediately noticed after installing this configuration into an empty .config/nvim that exiting insert mode doesn't work as expected. This is highly abnormal, but I can't see anyone who reported it before. Doesn't this bug you?

Steps to reproduce the issue:

  1. new file
  2. type `hello' followed by a newline/CR
  3. on the next line, start typing `he', the completion kicks in, but it takes two ESC to get back to normal mode.

Expected behavior It should always take one ESC to get back to normal mode from insert mode.

I believe I had this problem in the past with another completion system. Deoplete, maybe? Anyway, others had solved the problem and I found their solution, but I have no idea what is causing it this time. Just hoping you know.

despdx commented 7 months ago

Also, it takes two CRs at the end of a line if the last token is also a partial match. This doesn't seem right at all.

malarahfelipe commented 2 months ago

up :+1: