Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rescript-lang/rescript-sublime
Official Sublime Text plugin for ReScript.
https://github.com/rescript-lang/rescript-sublime
Last synced: about 1 month ago
JSON representation
Official Sublime Text plugin for ReScript.
- Host: GitHub
- URL: https://github.com/rescript-lang/rescript-sublime
- Owner: rescript-lang
- License: mit
- Created: 2020-08-22T13:48:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-16T10:23:49.000Z (over 3 years ago)
- Last Synced: 2024-08-03T16:08:43.862Z (4 months ago)
- Language: ReScript
- Size: 13.5 MB
- Stars: 8
- Watchers: 8
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-rescript - ReScript-Sublime
README
# 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 TestsFor more grammar inspirations, check ST's own [JavaScript grammar](https://github.com/sublimehq/Packages/blob/2c66f1fdea0dbc74aaa3b1c2f904040e9c1aaefa/JavaScript/JavaScript.sublime-syntax).