Skip to content

Commit cc81e91

Browse files
committed
Better setup instructions
1 parent 4d93eb8 commit cc81e91

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ The plugin activates on `.res` and `.resi` files. If you've already got Reason-L
2121
- Syntax errors diagnosis (only after formatting).
2222

2323
### Upcoming Features
24+
- Built-in bsb watcher (optional, and exposed explicitly as a pop-up; no worries of dangling build)
25+
- Type diagnosis
26+
- Jump to location
2427
- Formatting of temporary files
2528
- Formatting of files outside of a ReScript project root
26-
- Type diagnosis
2729

2830
## Develop
2931

@@ -45,22 +47,24 @@ This repo happens to also contain a language-server usable by other editors. If
4547

4648
### Running the Project
4749

48-
- Run `npm install` in this folder. This installs all necessary npm modules in both the client and server folder
49-
- Open VS Code on this folder.
50-
- Press Ctrl+Shift+B to compile the client and server.
50+
- Run `npm install` at the root. This will also install the necessary npm modules in both the `client` and `server` folders.
51+
- Open VS Code to this folder.
5152
- Switch to the Debug viewlet (command palette -> View: Show Run and Debug).
52-
- Select `Launch Client` from the drop down.
53-
- Run the launch config.
54-
- If you want to debug the server as well use the launch configuration `Attach to Server`
55-
- In the [Extension Development Host] instance of VSCode, open a document in 'plain text' language mode.
56-
- Try `ReScript` mode formatting with `.res` or `.resi` files.
53+
- Select `Client + Server` from the drop down, launch it (green arrow):
54+
55+
<img width="235" alt="image" src="https://user-images.githubusercontent.com/1909539/97448097-7d186a80-18ed-11eb-82d6-d55b70f54811.png">
56+
57+
(If you're getting some Promise-related error alert, file an issue here so that we can find a workaround; this seems to be a VSCode bug).
58+
- In the [Extension Development Host] instance of VSCode that just opened, open a `.res` file.
59+
- Try various features.
60+
- When you make a change, Go to the same Debug viewlet's Call Stack panel and restart the client and the server:
61+
62+
<img width="359" alt="image" src="https://user-images.githubusercontent.com/1909539/97448639-19db0800-18ee-11eb-875a-d17cd1b141d1.png">
5763

5864
#### Change the Grammar
5965

6066
- Modify `grammars/rescript.tmLanguage.json`.
6167

62-
Currently the best way to test it is to link your extension to `~/.vscode/extensions` then reload a separate test VSCode `.res` tab after each grammar change.
63-
6468
For more grammar inspirations, check:
6569
- [TypeScript's grammar](https://github.com/microsoft/TypeScript-TmLanguage/blob/a771bc4e79deeae81a01d988a273e300290d0072/TypeScript.YAML-tmLanguage)
6670
- [Writing a TextMate Grammar: Some Lessons Learned](https://www.apeth.com/nonblog/stories/textmatebundle.html)

0 commit comments

Comments
 (0)