You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a basic nvim-cmp configuration. I have keyword_length set to 2. The problem I'm having is that on entering insert mode, preceding characters such as = trigger the completion prompt when it isn't desirable.
For example, I'd like to change the below example code as follows:
I start by moving the cursor to the space following the =, and pressing s to delete the space and allow me to then press <CR> to take a new line. However, on entering insert mode with s, the preceding = seems to trigger the completion menu, which will receive the following <CR>, inserting whatever item is first in the completion menu.
You can see the motions below; note that I close the completion menu manually before proceeding with <CR>.
stylish_dancing_pig_1659418949.gif.mp4
The behaviour I think I would prefer is that the completion menu only appears automatically after n characters have been typed in insert (for e.g.) mode, and not that the menu automatically appears when the cursor follows n characters (regardless of how many have been typed).
Is what I have described above something that can be achieved with an nvim-cmp setting or do I need to implement a custom enabled function?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have a basic
nvim-cmp
configuration. I havekeyword_length
set to2
. The problem I'm having is that on entering insert mode, preceding characters such as=
trigger the completion prompt when it isn't desirable.For example, I'd like to change the below example code as follows:
I start by moving the cursor to the space following the
=
, and pressings
to delete the space and allow me to then press<CR>
to take a new line. However, on entering insert mode withs
, the preceding=
seems to trigger the completion menu, which will receive the following<CR>
, inserting whatever item is first in the completion menu.You can see the motions below; note that I close the completion menu manually before proceeding with
<CR>
.stylish_dancing_pig_1659418949.gif.mp4
The behaviour I think I would prefer is that the completion menu only appears automatically after
n
characters have been typed in insert (for e.g.) mode, and not that the menu automatically appears when the cursor followsn
characters (regardless of how many have been typed).Is what I have described above something that can be achieved with an
nvim-cmp
setting or do I need to implement a customenabled
function?Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions