-
Notifications
You must be signed in to change notification settings - Fork 78
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
VS Code Extension #47
Comments
Thanks for the suggestion. I only have experience writing textual VS Code extensions, so I'm not sure how this would work, but if it's possible, I think it would be really cool to support! I won't have the time to work on this myself any time soon, but I'd be interested in discussing/helping out if you were interested in investigating this. |
Are you up for a call in the next week? Most important thing would be a function to load a file like this:
Also, a changed event would be required that emits an event everytime the document is changed. |
If I understand correctly, there's already a function to load files like that (ignoring everything but the URL query string in the comment), Lines 5487 to 5488 in b1e9145
(To load a diagram based just on the tikz-cd code would require #40 or similar.)
This should be very straightforward.
I might be at some point, but I would need to figure out when; I'll get back to you. One thing I wonder is whether an more appropriate approach would be to create a desktop version using Electron: thinking about it a little more, I don't see that a VS Code plugin specifically would offer many advantages over simply being able to save commutative diagrams as files that can be included directly in LaTeX (as you mention in the original post), and this would be editor-independent. What are your thoughts? |
I think a vscode plugin would provide a lot of value. Such a plugin is very easy to discover and to install - Electron apps aren't. Also, Electron apps are a huge bloat - they usually have a size of up to 100 mb due to the Electron runtime. If you already use vscode to author latex, a vscode plugin would be very convenient. While #40 might be useful, it is not required for this. I imagine that the extension would save to latex files that include the base64 data as a comment as well as a notice that users are not meant to edit the file directly. The extension could load such a file by just parsing the base64 data. It's the same approach as drawio is using for svg files and it works really well in vscode. |
Another incentive might be the following: I use VSCode with HyperSnips for managing all my snippets. And in particular, this only works in VSCode, so whenever I draw a commutative diagram with quiver, I need to typeset every character of the math formula. I'm not sure whether this is the intended feature, but if this editor can be run inside of VSCode, I guess some cool thing can be done, such as supporting snippets directly. |
I found a simple workaround using live preview. Just DL quiver source, |
I'm probably not going to create commutative diagrams any time soon. However, I think a VS Code extension that wraps this editor might be a good thing if you are already using vscode to write latex.
It could offer a custom editor for *.commutative.latex files that reads and writes diagrams from/into such files. You could directly import this file from latex without needing to export anything.
I'm willing to help!
The text was updated successfully, but these errors were encountered: