inshellisense icon indicating copy to clipboard operation
inshellisense copied to clipboard

JetBrains IDE Incompatibility

Open Prezhub opened this issue 4 months ago • 3 comments

Describe the bug When running inside a JetBrains IDE's built-in terminal tested in Rider and IntelliJ, inshellisense's suggestion popup fails to redraw correctly. Instead of updating in place as I type, previous frames of the popup are not cleared, causing multiple stacked/duplicated copies of the suggestion box to appear on screen. Additionally, keystrokes appear to be applied at the wrong cursor position, as if inshellisense's internal cursor tracking has desynced from the terminal's actual cursor position.

To Reproduce Steps to reproduce the behavior:

  1. Install inshellisense and enable it for zsh (is init zsh >> ~/.zshrc)
  2. Open Rider (or another JetBrains IDE) and open the built-in Terminal tool window
  3. Start typing a command, e.g. cd
  4. Observe the suggestion popup rendering multiple stacked copies instead of updating a single popup, and typed characters not landing where expected

Expected behavior The suggestion popup should update in place as a single instance, matching the behaviour seen in other terminal emulators (e.g. VS Code's integrated terminal, Zed's terminal), and keystrokes should be applied at the correct cursor position.

Environment

  • OS: macOS (Apple Silicon)
  • Output of is --version: 0.0.1
  • Nodejs Version: v26.5.0
  • Shell: zsh
  • Shell Version: zsh 5.9 (arm64-apple-darwin25.0)

Additional context This appears specifically with JetBrains IDEs' built-in terminal (JediTerm engine), not with other terminal emulators. Rider sets TERMINAL_EMULATOR=JetBrains-JediTerm when running its integrated terminal, which can be used to detect this environment. As a workaround, I've disabled inshellisense's shell hook specifically when TERMINAL_EMULATOR=JetBrains-JediTerm is set, e.g.:

​ if [[ -z "$INTELLIJ_ENVIRONMENT_READER" && "$TERMINAL_EMULATOR" != "JetBrains-JediTerm" ]]; then [[ -f ~/.inshellisense/init/zsh/init.zsh ]] && source ~/.inshellisense/init/zsh/init.zsh fi ​

This resolves the rendering issue but means inshellisense is unavailable in JetBrains terminals. It would be great if inshellisense could either detect JediTerm and fall back to a simpler, non-overlapping render mode, or documented as a known incompatibility.

Prezhub avatar Jul 24 '26 16:07 Prezhub

Worth checking if this reproduces with a fresh install — some package managers cache broken versions.

Katomoto avatar Jul 24 '26 16:07 Katomoto

Worth checking if this reproduces with a fresh install — some package managers cache broken versions.

I attempted to reproduce it with a fresh instal and the issue persisted.

Prezhub avatar Jul 24 '26 16:07 Prezhub

can you try this: https://github.com/microsoft/inshellisense/pull/296#issuecomment-5073505369

michaelw avatar Jul 24 '26 19:07 michaelw