-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live preview for simple editors like helix #722
Comments
I came up with a hack to get this feature working before helix supports custom lsp commands: We can have a small proxy between helix and https://gitlab.com/TheZoq2/tinypp 2024-11-15_21-38-36.mp4 |
Got sync from the document to the editor working by translating the scroll events into I also tried adding an additional request on hover to sync from editor to document, but that seems to silently fail and I can't find exactly what I need to send From reading the source code, it seems like something along the lines of {"jsonrpc":"2.0","method":"workspace/executeCommand","params":{"command":"tinymist.scrollPreview","arguments":["primary",{"character":0,"event":"panelScrollTo","filepath":""/home/frans/Documents/rust/tinymist-preview-proxy/test.typp","line":10}]},"id":"1_scroll"} But it fails silently. @Myriad-Dreamin is there something I'm missing with that command? |
@TheZoq2 not sure the reason but your request is not a valid json. |
I updated a proposing solution to preview for simple editors: Lines 144 to 147 in a2cf51a
|
Oh yeah, good point. Looks like that was me replacing the {"jsonrpc":"2.0","method":"workspace/executeCommand","params":{"command":"tinymist.scrollPreview","arguments":["primary",{"character":0,"event":"panelScrollTo","filepath":"/home/frans/Documents/rust/tinypp/test.typp","line":2}]},"id":"1_scroll"} is what i'm sending |
Fwiw, here's another workaround. It basically adds tinymist-helix.mp4 |
Motivation
Having instant preview work in Helix.
Description
The live preview would be configured from the Helix side using the
initialize
request. I guess this could work similarly to how it works in this fork of typst-lsp: https://github.com/tmistele/typst-lsp(This feature is a follow-up of #357 to discuss specifically the support for editors like Helix that have limited LSP support.)
The text was updated successfully, but these errors were encountered: