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
Add codemirror mode for nim #5269
base: main
Are you sure you want to change the base?
Conversation
- Can you have imaginary longs?nteract/packages/editor/src/mode/nim.js Lines 421 to 426 in 480b353
This comment was generated by todo based on a
|
Hi @stisa, We would be happy to add support for nim but taking a different approach than this PR. This PR adds Go support and outlines our preferred approach. We recommend that you create an external package likely using much of the code in this PR. Thanks! Let us know if you have questions. cc/ @captainsafia |
Hi! Thanks for the reply. Basically I need to:
Does that sound correct? |
@captainsafia Please correct me if I'm wrong. @stisa I don't think you need to add the package to the dependencies. Much like Rust or Go, you would require it in |
@willingc I'm pretty sure it's needed, to my understanding rust and go worked like that because they're already present in codemirror's package (here), they just weren't (sorry if I'm wrong, I don't know much about javascript development) |
Thanks @stisa. Your points make sense to me. @captainsafia thoughts? |
Unfortunately, we will need to include it in the package.json since it is no bundled with the default set of syntax highlighters that CodeMirror provides. I say "unfortunately" because this is one of those things that I'd like to avoid having as a dependency of the package and instead allow people to configure in the desktop app. I don't have any ideas on how to make that possible now but I am open to hearing ideas from others! |
Yeah I understand adding dependencies just to support a language isn't ideal. One way to do it could be like with jupyter notebooks, where a special file |
This adds a codemirror mode for syntax highlighting of nim
If there's some other plugin mechanism in place to load modes for languages not supported by codemirror please let me now and I'll try to use that.
Screenshot: