Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>rescript-vscodeNew to Visual Studio Code? Get it now.

rescript-vscode

rescript-lang

|
3,118 installs
| (2) | Free
The official VSCode plugin for ReScript.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

rescript-vscode

The official VSCode plugin for ReScript.

Screen shot

Prerequisite

You must have bs-platform 8.3.3 installed locally in your project, through the usual npm installation. Older versions are not guaranteed to work.

Recommendation

Our highlighting works well with most popular VSCode themes, such as:

  • Dark+ (default dark), Light+ (default light)
  • Solarized Dark, Solarized Light
  • Monokai Dimmed
  • Tomorrow Night Blue
  • One Dark Pro
  • Mariana Pro

The only 2 themes we don't (and can't) support, due to their lack of coloring, are:

  • Dark (Visual Studio), Light (Visual Studio)

If your custom theme doesn't seem to highlight much (e.g. no colors for upper-case JSX tag, no distinction between module and variant), try one of the recommended themes to see if that's the problem. For more info, see this post.

Installation

The plugin's on VSCode Marketplace. In VSCode, cmd-shift-p -> "Install Extensions", then find "rescript-vscode".

The plugin activates on .res and .resi files. If you've already got Reason-Language-Server installed, it's possible that the latter took precedence over this one. Make sure you're using this plugin ("ReScript syntax") rather than Reason-Language-Server ("BuckleScript syntax").

Features

  • Supports .res, .resi and bsconfig.json.
  • Syntax highlighting.
  • Formatting, with caveats:
    • Currently requires the file to be part of a ReScript project, i.e. with a bsconfig.json.
    • Cannot be a temporary file.
  • Syntax errors diagnosis (only after formatting).
  • Built-in bsb watcher (optional, and exposed explicitly as a pop-up; no worries of dangling build).
  • Type hint.
  • Jump to location.
  • Autocomplete.
  • Snippets to ease a few syntaxes:
    • external features such as @bs.module and @bs.val
    • try, for, etc.
  • Folding, and custom folding through //#region and //#endregion.

Upcoming Features

  • Formatting of temporary files
  • Formatting of files outside of a ReScript project root
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2019 Microsoft