ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Re​Script

by rescript-lang ST3

Official Sublime Text plugin for ReScript.

Details

Installs

  • Total 390
  • Win 102
  • Mac 178
  • Linux 110
Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
Mac 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

rescript-sublime

The official Sublime Text plugin for ReScript.

Prerequisite

  • >=0.0.9 requires bs-platform >=8.3.0 installed locally in your project.
  • 0.0.8 requires bs-platform 8.2.0 installed locally in your project.

Install

Get it from https://packagecontrol.io/packages/ReScript

Features

  • Syntax highlighting (.res, .resi).
  • Formatting: Command Palette (cmd-shift-p) -> ReScript: Format File. caveats:
    • Currently requires the file to be part of a ReScript project, i.e. with a bsconfig.json.
    • Cannot be a temporary file.
  • Snippets to ease a few syntaxes:
    • external features such as @bs.module and @bs.val
    • try, for, etc.

Upcoming Features

  • Syntax errors diagnosis (only after formatting).
  • Formatting of temporary files
  • Formatting of files outside of a ReScript project root
  • Type diagnosis

Config

  • Command Palette -> UI: Select Color Scheme. Use Mariana for best effects (it'll be the new default Sublime Text theme!). Mariana colors tokens distinctively (and still pleasantly) enough for module and variant to be visually distinct despite both being capitalized. Gotta have accurate highlighting!

Develop

Thanks for your interest in contributing!

Test Syntax

Docs at https://www.sublimetext.com/docs/3/syntax.html and https://www.sublimetext.com/docs/3/scope_naming.html

Tldr (documented in first link):

  • Change ReScript.sublime-syntax
  • Open syntax_test.res
  • Command Palette -> Build With: Syntax Tests

For more grammar inspirations, check ST's own JavaScript grammar.