bs-platform 8.2.0 installed locally in your project.
Download the latest release here: https://github.com/rescript-lang/rescript-language-server/releases
Go to VSCode, Command Palette (cmd-shift-p) -> "Extensions: Install from VSIX", then select the rescript-language-server.vsix you just downloaded.
For now, you have to clone the repo and run npm run compile. The language server will be at server/out/server.js. Wire that into your editor.
- Syntax highlighting (
.res,.resi). - Formatting, with caveats:
- Currently requires the file to be part of a ReScript project, i.e. with a
bsconfig.json. - Cannot be a temporary file
- Currently requires the file to be part of a ReScript project, i.e. with a
- Syntax errors diagnosis (only after formatting).
- Formatting of temporary files
- Formatting of files outside of a ReScript project root
- Type diagnosis
.
├── client // Language Client
│ ├── src
│ │ └── extension.ts // Language Client entry point
├── package.json // The extension manifest.
└── server // Language Server
└── src
└── server.ts // Language Server entry point
- Run
npm installin this folder. This installs all necessary npm modules in both the client and server folder - Open VS Code on this folder.
- Press Ctrl+Shift+B to compile the client and server.
- Switch to the Debug viewlet (command palette -> View: Show Run and Debug).
- Select
Launch Clientfrom the drop down. - Run the launch config.
- If you want to debug the server as well use the launch configuration
Attach to Server - In the [Extension Development Host] instance of VSCode, open a document in 'plain text' language mode.
- Try
ReScriptmode formatting with.resor.resifiles.