Reason
Official Reason plugin for Sublime Text
Details
Installs
- Total 1K
- Win 257
- Mac 764
- Linux 436
| Jun 4 | Jun 3 | Jun 2 | 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 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 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 | 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
Sublime Text package for Reason
To have the complete Sublime Text Reason experience, there are two plugins to install: this one, and language-server.
This one provides syntax highlight, snippets for Reason and allows related features to recognize the Reason syntax.
Language-server provides all the others (autocompletion, type hint, jump-to-definition, etc.).
This Plugin's Installation
The plugin's published on Package Control.
- Go to Command Palette (
cmd-shift-p) -> Package Control: Install Package. - Choose “Reason”.
Language Server Installation
See https://github.com/jaredly/reason-language-server#sublime-text for language-server installation and configuration.
If you're doing native development, instead of reason-language-server, you can try ocaml-language-server.
Bonus Language Server Configuration
In addition to the installation & configuration above, you might want to set some extra keyboard shortcuts.
- Go to Command Palette (
cmd-shift-p) -> Preferences: Key Bindings - Add the following to your configuration:
[
// ...whatevever config you had before
{
"keys": ["super+alt+enter"],
"command": "lsp_symbol_definition",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": ["source.reason"]
}
]
},
{
"keys": ["super+shift+c"],
"command": "lsp_format_document",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": ["source.reason"]
}
]
}
]
super means command on macOS, so you can do e.g. cmd-shift-c to format your Reason files.
Here are all the commands you can assign shortcuts to.
Develop This Package
Thanks for the help!
To test this package locally, do Preferences: Browse Packages and symlink this repo into Packages/User. Disable the existing Reason package, if any.
Install PackageDev, change whichever JSON file in the repo, then call PackageDev: Convert ... from the command palette and convert the file into the corresponding XML files.