Enter-tainer / typst-preview

[DEPRECATED] Use tinymist instead
https://Enter-tainer.github.io/typst-preview/
MIT License
444 stars 21 forks source link

Preview does not scroll when using the vscode Neovim extension #280

Open KarthikKaravatt opened 8 months ago

KarthikKaravatt commented 8 months ago

Describe the bug Preview does not scroll when using the vscode nvim extension. This is the case for both the scroll on onSelectionChange and onSelctionChangeByMouse

To Reproduce Steps to reproduce the behavior (Library test):

  1. Install VSCode Noevim
  2. Install Typst-preview
  3. Open typst document
  4. move through document using j and k

Expected behavior The preview should scroll

Package/Software version:

VSCode version(Help -> About):

Version: 1.87.2 (user setup)
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:20:17.278Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.22631

typst-preview extension version: v0.7.3

Logs:

typst-preview server log(Output Panel -> typst-preview):

typst-preview client log(Help -> Toggle Developer Tools -> Console):

Additional context Add any other context about the problem here.

Enter-tainer commented 8 months ago

There are 3 kinds of selection change. https://code.visualstudio.com/api/references/vscode-api#TextEditorSelectionChangeKind Mouse, Keyboard, and Command. I guess vim extension is Command

Command is currently ignored to avoid loops. We may only accept Command when the editor is on focus to fix vim plugin