Mojo for Visual Studio Code - Nightly
This VS Code extension from the Modular team adds support for the Mojo programming language. Features
Get started
ConfigurationThe extension will attempt to find the path of the Mojo SDK installation using
the
Mojo SDK ResolutionWhenever you want to execute an action on a file, the extension will look for a
suitable Mojo SDK that can serve it. The search will start with the
DebuggerA fully featured LLDB debugger is included with Mojo. You can press the down
arrow next to the The default key is Code CompletionTo trigger a completion press Rebind the hotkey in Preferences: Open Keyboard Shortcuts > Hover and Doc HintsHover over a symbol with your cursor for doc hints. The default hotkey
to trigger it in macOS is Rebind the hotkey in Preferences: Open Keyboard Shortcuts >
Signature HelpMojo provides function overloading, so you need a way to scroll through the
multiple signatures available. You can bring this up with the hotkey
Rebind related hotkeys in Preferences: Open Keyboard Shortcuts >
Code DiagnosticsCode diagnostics are indicated with an underline on the code and details appear
when you hover. You can also see them in the Rebind related hotkeys in Preferences: Open Keyboard Shortcuts >
Tip: Also try the Doc String Code BlocksUnique to Mojo, you get a full LSP experience for code blocks inside doc strings, with all the features mentioned here including completions and diagnostics: Go to SymbolYou can quickly jump to a symbol in the file with This also enables the outline view in the explorer window. Rebind the hotkey in Preferences: Open Keyboard Shortcuts >
Quick FixIf there is an available quick fix with the code diagnostic, click
the lightbulb icon or use the default hotkey Rebind the hotkey in Preferences: Open Keyboard Shortcuts >
Run Mojo FileThe extension provides a set of actions on the top-right of a Mojo file to run
the active file, which by default are under a small These actions are also available in the command palette and under the You may bind hotkeys to any of the actions listed here. For example, to bind a
hotkey for the "Run Mojo File" action, open preferences, then select
Run Mojo FileThis executes the current Mojo file in a terminal that is reused by other invocations of this same action, even if they run a different file. Run Mojo File in Dedicated TerminalThis executes the current Mojo file in a dedicated terminal that is reused only by subsequent runs of this very same file. Code FormattingFrom the command palette run Restarting Mojo ExtensionThe extension may crash and produce incorrect results periodically, to fix this
from the command palette search for Bind a hotkey in Preferences: Open Keyboard Shortcuts >
|