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 406
  • Win 105
  • Mac 185
  • Linux 116
Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18
Windows 0 0 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 1 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 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 1 0 1 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.