SML Environment is an extension for Visual Studio Code, allowing short executions like EMACS sml-mode and providing a text-highlight with some auto-complete features.
This project is been developed by Vinícius Julião
(@vrjuliao), but the text-highlight is an
updated version of
Standard ML extension
by Darin Morrison (@freebroccolo)
-
Short Execution:
- Open a sml file (or change your Language Mode for
smlbyCtrl+K M) - Select a piece of SML code.
- Press
Ctrl+Enter(Linux, Windows) orCmd+Enter(Mac). - See the result on Output console.
- Open a sml file (or change your Language Mode for
-
Text Highlight:
-
usestatement:
To import a file to the environment, specify the filepath considering the workspace root directory as the starting point. For instance, if you have opened the foldermy_codes/workdir/, and want to importmy_codes/workdir/foo.sml, then type:use "foo.sml" -
Run current File:
- Press
Ctrl+Shift+Popen Command Palette. - Type
sml. - Select "SML Environment: Execute current file".
- Press
-
This extension needs of SML/NJ for short execution. After install that, add the
smlbin directory in your$PATH-
Windows
Download msi file here -
Linux
WARNING:smlnjnot work well in WSL. To use this extension on Windows, it is preferable install it directly in Windows.
Search forsmlnjin your package manager. For instance, on Ubuntu terminal, type:foo@bar:~$ sudo apt install smlnj -
MacOs
Via Brew:foo@bar:~$ brew install --cask smlnj -
Or else
Follow the steps in SML/NJ download page for you operating system.
-
Instead of add the sml interpreter to the $PATH, you can specify a binary for
the sml interpreter.
Just setting the sml-environment-interpreter-path attribute on your
settings.json file.
-
usestatement:
Adding the capability for import files. -
Bug fixed: Now, all syntax errors will be reported instantly.
-
Syntax highlight fixes.
Initial release
The code for this extension is available on github at: https://github.com/vrjuliao/sml-vscode-extension
- 😄 Star this project on GitHub and Visual Studio Marketplace
- 😊 Leave a comment