I am developing a plugin that does use the insertcharpre autocommand. It looks like the way Nvim-cmp uses the nvim_feedkeys function causes to trigger the mentioned command.
A quick glance at the sources brings up the following observations:
Nvim_feedkeys function accepts the parameter that determines the mode how characters are fed.
Nvim-cmp uses "t" as the value, which indicates that it simulates regular typing.
It might be the cause of the mentioned behavior.
Is there a way to configure the behavior of how the accepted completion values are inserted in the buffer tha t can avoid triggering the insertcharpre autocommand?
In addition ot that Nvim-cmp echoes the number of completions and triggers a message with the content of "Back to the original" after inserting the value. It can be related to how Neovim handles cursor movements and position changes.
I am using Neovim Nightly as of the time of writing (end of October 2023) Neovim 0.10.0 and the latest code from the "Main" branch of Nvim-cmp.
I am developing a plugin that does use the insertcharpre autocommand. It looks like the way Nvim-cmp uses the nvim_feedkeys function causes to trigger the mentioned command. A quick glance at the sources brings up the following observations:
Is there a way to configure the behavior of how the accepted completion values are inserted in the buffer tha t can avoid triggering the insertcharpre autocommand?
In addition ot that Nvim-cmp echoes the number of completions and triggers a message with the content of "Back to the original" after inserting the value. It can be related to how Neovim handles cursor movements and position changes.
I am using Neovim Nightly as of the time of writing (end of October 2023) Neovim 0.10.0 and the latest code from the "Main" branch of Nvim-cmp.
Any hints and help will be as always appreciated.
Best, Pawel