- Notifications
You must be signed in to change notification settings - Fork0
Mojo🔥 syntax support for Visual Studio Code
License
Karsten7/mojo-vscode
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ThisVS Code extension provides syntax support for theMojo🔥 programming language (Docs).
It is based on the syntax information provided in themojo-syntax repository.
Provides syntax highlighting, bracket matching, code folding, and indenting for Mojo🔥 files in the editor
(Example code fromMojo linguist samples)
and for Mojo🔥 code cells in notebooks
(Example code from theMojo Playground)
Please note that this extension is not an official product and is not associated with the Mojo🔥 development team orModular. It is developed and maintained with the intention of providing a useful tool for Mojo🔥 developers until official support is fully implemented in VS Code.
- Install the Mojo🔥 VS Code Extension from theVS Code Marketplace.
- Open or create a file with the
.mojo
or.🔥
extension to automatically enable syntax highlighting and other language features. - Use the
mojo
language identify to customize Mojo🔥 specific settings. - Start coding with Mojo🔥 and enjoy the enhanced support provided by the extension.
Check out thewiki on how to connect your local VSCode to the JupyterHub of the Mojo Playground.
This extension is an open-source project, and community contributions are welcome. If you encounter any issues, have feature requests, or would like to contribute code improvements, please visit the project repository onGitHub.
For fixes and improvements to the syntax that also apply to Python, pull requests should be opened against theMagicPython project. For Mojo-specific syntax issues and improvement, the officialmojo-syntax repository should be the right place.
For anything beyond the syntax file or if you're unsure where the right place is, please create apull request orissue onthis extensions' GitHub page.
Currently the syntax file intentionally deviates form the officialmojo-syntax for ownership related markers on argument names. The change introduced in the merged pull request titled"Update the Mojo syntax file for the May 11 release" is not applied. Insteadinout
,owned
, andborrowed
can be highlighted by using the"variable.parameter.function.ownership"
scope that is implemented in the syntax file of this project. Furthermore, all.python
have been replaced by.mojo
throughout the syntax file.
With the following settings within the.code-workspace
file of that file's workspace:
"settings": {"editor.tokenColorCustomizations": {"textMateRules": [ {"scope":"variable.parameter.function.ownership","settings": {"foreground":"#FF0000" } }, {"scope":"variable.parameter.function.language.special.self","settings": {"foreground":"#00FF00" } } ] } }
Please be aware that this extension is in no way officially endorsed, supported, or affiliated with the Mojo🔥 development team orModular. It is a community-driven effort to provide temporary support for Mojo🔥 in VS Code until official support becomes available.
Initial release
About
Mojo🔥 syntax support for Visual Studio Code
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.