extensions with custom rendering of documents #37270
Replies: 3 comments
-
|
Great suggestion! I’m quite new to the Zed editor — it looks really promising, blazing fast, and its AI integration is impressive. |
Beta Was this translation helpful? Give feedback.
-
|
Please consider (also) a middle ground. Having some kind of WYSIWYM rich text common support can make extensions much simpler than requiring every extension to implement a full custom render. By adding support to Zed core for a simple set of:
In a WYSIWYM editable way, a long list of use cases would be covered and be easily implemented by extensions. E.g., something like typora.io would be easily reimplemented. Also by supporting embedded images an extension could implement LaTeX fragments edition/preview like Emacs does (see https://youtu.be/n-AfvuV-bYo?t=339 ) You usually don't need to see the final product while editing, but you need an approximate version of it instead of looking always at the entire raw markup noise. Supporting rich text / images / tables can be a massive improvement for editing over raw text, without requiring extensions to implement/embed/use a full WebView HTML render or use low level OpenGL API calls. We need to go beyond of having an edit panel plus a preview panel, it's very primitive. Note that even a terminal based editor like neovim is starting to implement similar features: https://github.com/Thiago4532/mdmath.nvim / https://github.com/MeanderingProgrammer/render-markdown.nvim , and also that the Emacs GUI renderer already implements most of those rich text features (but not tables) although with some brokenness (e.g. scrolling is janky for big images). |
Beta Was this translation helpful? Give feedback.
-
|
Would this require a new extension type? I've seen one extension which add parts of a full WYSIWYG feature set for Markdown, MermaidJS, but that extension requires writing into multiple buffers to allow the Markdown Preview to work properly. Is that an indication that, for an extension to provide a full WYSIWYG Markdown editing experience, a new extension type is needed? For reference, I'd love to use something like the Quarto Visual Editor in VSCode in Zed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
continue #10696 (comment)
VSCode calls this Custom Editor API
in the spirit of Zed editor (high performance), this custom rendering feature
should not be limited by some high-level (html/javascript) webview renderer
but extensions should be able to use high-performance native rendering
probably down to direct OpenGL API calls
(Qt has QOpenGLBuffer and QVulkanWindow)
with this custom rendering feature, it should be possible for extensions
to either fully replace the main code editor
or to create extra panels next to the main code editor (split view, sidebar)
related
Beta Was this translation helpful? Give feedback.
All reactions