bug: taking over `type` breaks Copilot Chat newline bindings in chat input

Author: RubenSibonCreated Sep 29, 2026Updated Sep 29, 2026

Check the following:

  • I have tried setting vscode-neovim.neovimClean in VSCode settings and restarting VSCode.
  • I have read the vscode-neovim docs.
  • I have searched existing (closed!) issues.

Neovim version (nvim -v)

0.12.5

VSCode version and flavor (Cursor, vscodium, …)

1.139.1

Operating system/version

OS: Ubuntu 24.04.5 LTS x86_64; Host: Windows Subsystem for Linux - Ubuntu (2.6.3.0)

Problem (including log messages)

When vscode-neovim is enabled, a user keybinding that inserts a newline into the VS Code Copilot Chat input by invoking type stops working, even though VS Code resolves the keybinding correctly.

The same keybinding works again if either:

  1. vscode-neovim is stopped, or
  2. the binding is changed from command: "type" to command: "default:type".

This suggests that vscode-neovim's takeover of the type command is affecting non-editor text inputs such as Copilot Chat, where it should either not intercept type at all, or should fall through to default:type.

Steps To Reproduce

  1. Make sure asvetliakov.vscode-neovim is enabled and started.

  2. Add this keybinding:

    json
    {
      "command": "workbench.action.chat.submit",
      "key": "ctrl+enter",
      "when": "chatInputHasFocus && chatInputHasSendableContent"
    },
    {
      "key": "enter",
      "command": "type",
      "args": { "text": "\n" },
      "when": "chatInputHasFocus"
    }
  3. Open VS Code Copilot Chat, type a sentence and press enter.

Expected Behavior

A newline is inserted into the Copilot Chat input.

Actual Behavior

No newline is inserted while vscode-neovim is running.

If I stop the extension, the same keybinding works.

If I keep the extension enabled but change the binding to:

json
{
  "key": "enter",
  "command": "default:type",
  "args": { "text": "\n" },
  "when": "chatInputHasFocus"
}

then the newline works again.

Evidence

Keyboard Shortcuts Troubleshooting shows that the keybinding itself is matching and VS Code is invoking type in the chat input:

2026-09-29 15:15:33.671 [info] [Window] [KeybindingService]: | Resolving Enter
2026-09-29 15:15:33.672 [info] [Window] [KeybindingService]: \ From 45 keybinding entries, matched type, when: chatInputHasFocus, source: user.
2026-09-29 15:15:33.672 [info] [Window] [KeybindingService]: + Invoking command type

So the failure is not the when clause. The failure happens after the keybinding resolves, on the type command path.

Additional Context

From the extension source, vscode-neovim registers its own handler for type using registerTextEditorCommand("type", ...), so this appears to be the interception point.

This behaviour seems correct for text editors, but incorrect for non-editor inputs like Copilot Chat.

Workaround

Bind chat newline to default:type instead of type.

Source: vscode-neovim/vscode-neovim