Hi, thank you for putting effort into vscode - neovim integration
really like it
but after some tastes, I ran into an issue when i need to remap keys
I mapped some key strokes to call editor.action.formatDocument,
editor called the command but also with some weird monifications.
I've recorded gifs below.
But when I manually call the command in nvim command prompt, it does not have this issue.


and here is my mapping
nnoremap <space><space> :<c-u>call VSCodeCall('editor.action.formatDocument')<cr>
vnoremap <space><space> :<c-u>call VSCodeCall('editor.action.formatSelection')<cr>
weird issue
this works
nnoremap <expr> <space><space> VSCodeCall('editor.action.formatDocument')
also i recommend to use VSCodeNotify unless you really need blocking call (e.g. you calling few commands and need to wait for previous one)
ok, thanks. Now it works like a charm.
yeah, I tried VSCodeNotify first, it has the same issue.
Debugged the problem - the problem it's the vscode command line sends additional <C-u> on change/initial appearing (to re-enter text) and it's causing weird behavior. <expr> doesn't use command line mode, so it works fine. Will fix today, thanks for reporting
The fix is landed in 0.0.32
Most helpful comment
Debugged the problem - the problem it's the vscode command line sends additional
<C-u>on change/initial appearing (to re-enter text) and it's causing weird behavior.<expr>doesn't use command line mode, so it works fine. Will fix today, thanks for reporting