Reason
Official Reason plugin for Sublime Text
Details
Installs
- Total 1K
 - Win 255
 - Mac 762
 - Linux 432
 
| Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 
| Mac | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 
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.