Skip to content

hkust-taco/mlscript-vscode-extension

Repository files navigation

MLscript Syntax Highlight

Syntax highlighting support for the MLscript programming language.

Features

  • Highlight MLscript source files (ending with .mls or .wit).
  • Highlight most keywords and identifiers.
  • Highlight comments created by DiffTests.
  • This is not a language server.

Extension Settings

This extension does not have settings currently.

Automated Publishing

This repository includes .github/workflows/publish.yml. On pushes to main, the workflow compares the current package.json version to the previous commit. If the version changed, it builds the extension, packages a .vsix, uploads that file as a workflow artifact, and publishes it to the VS Code Marketplace.

To enable publishing:

  1. Make sure the publisher field in package.json matches your Visual Studio Marketplace publisher ID.
  2. Create an Azure DevOps Personal Access Token with Marketplace Manage scope.
  3. Add that token to GitHub Actions as a repository or environment secret named VSCE_PAT.
  4. Push a commit to main that updates the extension version in package.json.

Known Issues

  • Some token scopes might be wrong.
  • Types, terms and declarations in comments are not highlighted.

Release Notes

0.0.9

Features

  • Highlight MLscript source files ending with .wit in the same way as .mls.
  • Highlight with as a keyword anywhere it appears, not just at the end of a line.

0.0.8

Features

  • Add a document symbol provider for the VS Code outline view.
  • Improve keyword and declaration handling used by the extension parser and symbols.

0.0.7

Features

  • Support open statements.
  • Highlight more MLscript keywords.

0.0.6

Features

  • Highlight type in class Foo[type A].
  • Highlight nested DiffTests flags (e.g. :ducs:postprocess.result).

Fix

  • Include trailing single quotes as a part of entity names.
  • Recognize trailing single quotes as a part of words. So, if you press ⌥← or ⌥→, the editor will select names including the trailing single quotes.
  • Comments can follow DiffTests flags.

0.0.5

Features

  • Support hexidecimal, octal, and binary integer literals. #199
  • Support floating-point decimal literals. #199

Fix

  • The rule for parameter lists should not be at top-level.
  • Highlight some keywords even they are not in a valid declaration.
  • Highlight keyword rec.
  • Highlight normal variables.

0.0.4

Additions

  • Highlight modifiers declare and virtual for function declarations.
  • Highlight modifiers declare, private, abstract, and data for class declarations.
  • Highlight modifier private for trait declarations.
  • Highlight modifiers declare and private for module declarations.
  • Highlight mixin declarations.
  • Highlight keyword super.
  • Highlight modifiers declare and virtual for function declarations.
  • Highlight val declarations with modifiers declare, private, and lazy.
  • Highlight in/out variance modifiers and type variables starting with a single quote in parameter lists.
  • Highlight field selections. For example, the size in this.size. Note that the highlighting isn’t based on semantics, it simply matches identifiers after a period.

Changes

  • Set the scope of [ERROR] and [WARNING] to markup.bold as I found many VSCode themes does not colorize scope message.error.
  • Set this, true, false, and null to the correct constant scope.
  • Do not automatically close single quotations becuase they are also used in variable names and type variable names. (The notIn property of autoClosingPairs does not support user-defined scope names.)

0.0.3

  • Highlight functions with user-defined symbolic operators (#177).

0.0.2

  • Support folding error and warning blocks generated by DiffTests.
  • Add two simple snippets. I'm just trying it out.
  • Fix minor bugs.
    • Only string in stringOf will be highlighted.
  • Add more string escape sequences.

0.0.1

Create the extension and add basic syntax support.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors