Skip to content

Latest commit

 

History

History
149 lines (102 loc) · 5.08 KB

README.md

File metadata and controls

149 lines (102 loc) · 5.08 KB

Millet

A language server for Standard ML (SML).

Install for: VS CodeOpen VSX

Millet logo

Millet analyzes SML code without running it, and provides information like:

  • Inline diagnostics
  • Hover for type/documentation
  • Inlay hints
  • Jump to definition
  • Code completions
  • Code actions
  • Document symbols
  • Find all references

Millet also supports SML/NJ Compilation Manager (CM) and ML Basis (MLB), allowing for analysis of multi-file SML projects.

Note that Millet does not actually run SML code. To do that, you'll need an installation of SML, like SML/NJ or MLton.

  • Check out the blog post introducing the project.
  • Refer to the manual for information about setup, configuration, and features.
  • See the full documentation for other information, like explanations for diagnostics and project policies.

Install

Official sources

VS Code and compatible editors like VSCodium are the only editors for which we provide an "official" extension. However, because Millet is a language server, it should be able to be adapted to work with any editor that supports language servers.

Unofficial sources

Millet is also available in various other package managers and repositories. These are maintained by the community and are not official, so they may be out of date.

There is some support for Millet in various editors as well:

Community

Millet is affiliated with Project Savanna, a project whose goal is to improve tooling for Standard ML.

There is a Discord server for Project Savanna. The server has a channel for Millet support and discussion.

Contributing

We encourage contributions of all kinds. Please read the contributing guide.

Development

Dependencies

What Version Why Required
Rust Latest stable Build Rust code Yes
Node.js 20 Build TypeScript code No

The project is mostly written in Rust, so you will need a Rust installation. It should include:

  • rustc, a Rust compiler
  • cargo, a Rust package manager and build system
  • rustfmt, a Rust formatter
  • clippy, a Rust linter

The minimum supported Rust version (MSRV) is the latest stable.

If you want to build the VS Code extension in TypeScript as well, you should also install Node.js.

If your editor supports it, we also recommend installing Rust Analyzer, a language server for Rust.

Building/testing

This is a regular Rust project, so the usual Cargo commands will work:

$ cargo build
$ cargo test

We also use clippy and rustfmt, which can be run with cargo as well:

$ cargo fmt
$ cargo clippy

These can all be run together as they are in CI:

$ cargo xtask ci

VS Code

If you're using VS Code, you can try out the VS Code extension:

  1. Open the repository in VS Code.
  2. Open the Run panel from the activity bar (the play button with bug).
  3. Select "extension" in the drop down.
  4. Press the green play button.

Naming

  • "Millet" has the letters M and L in it, in that order. So does "Standard ML".
  • Birds eat millet. A bird named Polly Morphism is the mascot for 15-150, Carnegie Mellon's introductory functional programming course, which is taught in Standard ML.

Logo

The logo features Polly Morphism, wearing a 15-150 style T-shirt, writing SML on a Millet-branded laptop, encircled with millet. Yixin He drew the logo.

License

Like Rust itself and many other projects in the Rust community, Millet is licensed under either the MIT license or the Apache license v2.0, at your option.