Millet
Standard ML (SML) support for VS Code.
See the blog post introducing the project.
Warning
The language server is beta-quality software. It might be slow, wrong, incomplete, or unstable.
You can turn it off by setting millet.useLanguageServer to false in your VS Code settings.
Features
- Syntax highlighting
- Language configuration (comments, brackets, etc)
- Snippets
- Inline errors
- Hover for type/documentation
- Go to definition/type definition
Usage
- Install the extension.
- Open VS Code to a folder containing a single "group file", i.e. one of
- a ML Basis file, with extension
.mlb
- a SML/NJ CM file, with extension
.cm
- Ensure that group file lists all the SML/other group files in the folder, in the order you wish for them to be analyzed.
Note: If a file is not transitively reachable from the root group file, it will not be analyzed.
Example
sources.mlb
Foo.sml
Bar.sml
Foo.sml
structure Foo = struct
fun fact 0 = 1
| fact n = n * fact (n - 1)
end
Bar.sml
val _ = Foo.fact 3
| |