Skip to content

TanishTuteja/sml-vscode-extension

 
 

Repository files navigation

SML Environment

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)

Features

  • Short Execution:

    1. Open a sml file (or change your Language Mode for sml by Ctrl+K M)
    2. Select a piece of SML code.
    3. Press Ctrl+Enter (Linux, Windows) or Cmd+Enter (Mac).
    4. See the result on Output console.
    demo of preview feature
  • Text Highlight:

    demo of preview feature
  • use statement:
    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:

    use "foo.sml"
  • Run current File:
    This option will restart the REPL environment

    1. Press Ctrl+Shift+P (Linux, Windows) or Cmd+Shift+P (Mac) open Command Palette.
    2. Type sml.
    3. Select "SML Environment: Execute current file".

Requirements

  • SML/NJ

    This extension needs of SML/NJ for short execution. After install that, add the sml bin directory in your $PATH

    • Windows
      Download msi file here

    • Linux
      WARNING: smlnj not work well in WSL. To use this extension on Windows, it is preferable install it directly in Windows.
      Search for smlnj in 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.

Configuration

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.

Release Notes

0.0.2

  • use statement:
    Adding the capability for import files.

  • Bug fixed: Now, all syntax errors will be reported instantly.

  • Syntax highlight fixes.

0.0.1

Initial release


GitHub

The code for this extension is available on github at: https://github.com/vrjuliao/sml-vscode-extension

Like this work?

  • 😄 Star this project on GitHub and Visual Studio Marketplace
  • 😊 Leave a comment

License

Apache 2.0

About

VSCode plugin for Standard ML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.0%
  • Standard ML 2.0%