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)
Open a sml file (or change your Language Mode for sml by Ctrl+K M)
Select a piece of SML code.
Press Ctrl+Enter (Linux, Windows) or Cmd+Enter (Mac).
See the result on Output console.
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 folder my_codes/workdir/, and want to
import my_codes/workdir/foo.sml, then type:
Run current File: This option will restart the REPL environment
Press Ctrl+Shift+P (Linux, Windows) or Cmd+Shift+P (Mac) open Command Palette.
Select "SML Environment: Execute current file".
This extension needs of SML/NJ for short execution.
After install that, add the sml bin directory in your $PATH
Linux WARNING: smlnj not work well in WSL.
To use this extension on Windows, it is preferable install it directly in
Search for smlnj in your package manager.
For instance, on Ubuntu terminal, type: