@@ -21,9 +21,11 @@ The plugin activates on `.res` and `.resi` files. If you've already got Reason-L
21
21
- Syntax errors diagnosis (only after formatting).
22
22
23
23
### 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
24
27
- Formatting of temporary files
25
28
- Formatting of files outside of a ReScript project root
26
- - Type diagnosis
27
29
28
30
## Develop
29
31
@@ -45,22 +47,24 @@ This repo happens to also contain a language-server usable by other editors. If
45
47
46
48
### Running the Project
47
49
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.
51
52
- 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 " >
57
63
58
64
#### Change the Grammar
59
65
60
66
- Modify ` grammars/rescript.tmLanguage.json ` .
61
67
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
-
64
68
For more grammar inspirations, check:
65
69
- [ TypeScript's grammar] ( https://github.com/microsoft/TypeScript-TmLanguage/blob/a771bc4e79deeae81a01d988a273e300290d0072/TypeScript.YAML-tmLanguage )
66
70
- [ Writing a TextMate Grammar: Some Lessons Learned] ( https://www.apeth.com/nonblog/stories/textmatebundle.html )
0 commit comments