Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Standard ML SyntaxNew to Visual Studio Code? Get it now.
Standard ML Syntax

Standard ML Syntax

BroLore

|
2 installs
| (0) | Free
Syntax highlighting for Standard ML (SML '97)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Standard ML Syntax

Syntax highlighting for Standard ML (SML '97) in .sml, .sig and .fun files.

Features

  • Nested block comments (* (* *) *), including SML's rule that (*) opens a comment, with TODO / FIXME / XXX / NOTE markers
  • Strings with every SML escape (\n \t \" \\ \^C \ddd \uXXXX), multi-line formatting gaps (\ \), and invalid escapes marked as errors
  • Character literals: #"a", #"\n"
  • All numeric literals: 42, ~42, 0xFF, 0w7, 0wxFF, 3.14, 1e10, ~2.5E~3
  • Core and module keywords, with andalso orelse div mod o as word operators
  • Names being declared by fun, val, type / datatype / eqtype / abstype / withtype, structure / signature / functor and exception
  • Type variables ('a, ''a), built-in types, and true false nil NONE SOME LESS EQUAL GREATER
  • Structure qualifiers (List.map), record selectors (#1, #name), the _ wildcard, capitalised constructors and symbolic operators

Also sets up (* *) comment toggling, bracket matching and basic indentation after let, local, struct, sig, in, of, = and =>.

Notes

If you have another Standard ML extension installed, both will claim .sml files. Disable one of them, or choose Standard ML from Change Language Mode.

A Neovim / Vim version of the same highlighter lives in the repository.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft