You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- For the native analysis binary tests: `cd analysis && make test`.
50
54
51
-
###Change the Grammar
55
+
## Change the Grammar
52
56
53
57
The _real_ source of truth for our grammar is at https://github.com/rescript-lang/rescript-sublime. We port that `sublime-syntax` grammar over to this weaker TextMate language grammar for VSCode and the rest. There are some subtle differences between the 2 grammars; currently we manually sync between them.
54
58
@@ -58,14 +62,10 @@ For more grammar inspirations, check:
-[Writing a TextMate Grammar: Some Lessons Learned](https://www.apeth.com/nonblog/stories/textmatebundle.html)
60
64
61
-
###Snippets
65
+
## Snippets
62
66
63
67
Snippets are also synced from https://github.com/rescript-lang/rescript-sublime. VSCode snippets docs [here](https://code.visualstudio.com/api/references/contribution-points#contributes.snippets).
64
68
65
-
### Autocomplete, Jump To Definition, Type Hint, Etc.
66
-
67
-
These are taken care of by the binary at [rescript-editor-support](https://github.com/rescript-lang/rescript-editor-support). We just invoke it in `RescriptEditorSupport.ts`.
68
-
69
69
## Binary Invocation
70
70
71
71
We call a few binaries and it's tricky to call them properly cross-platform. Here are some tips:
@@ -76,6 +76,10 @@ We call a few binaries and it's tricky to call them properly cross-platform. Her
76
76
-`execFile` does not work on windows for batch scripts, which is what Node scripts are wrapped in. Use `exec`. See more [here](https://github.com/rescript-lang/rescript-vscode/blob/8fcc1ab428b8225c97d2c9a5b8e3a782c70d9439/server/src/utils.ts#L110).
77
77
- Thankfully, many of our binaries are native, so we can keep using `execFile` most of the time.
78
78
79
+
## General Coding Guidance
80
+
81
+
-`server/` is a standalone folder that can be vendored by e.g. Vim and Sublime Text. Keep it light, don't add deps unless absolutely necessarily, and don't accidentally use a runtime dep from the top level `package.json`.
82
+
79
83
## Rough Description Of How The Plugin Works
80
84
81
85
### Editor Diagnostics
@@ -167,3 +171,5 @@ Currently the release is vetted and done by @chenglou.
167
171
- Download and unzip the 3 platforms' production binaries from the Github CI. Put them into `server/analysis_binaries`.
168
172
- Use `vsce publish` to publish. Official VSCode guide [here](https://code.visualstudio.com/api/working-with-extensions/publishing-extension). Only @chenglou has the publishing rights right now.
169
173
- Not done! Make a new manual release [here](https://github.com/rescript-lang/rescript-vscode/releases); use `vsce package` to package up a standalone `.vsix` plugin and attach it onto that new release. This is for folks who don't use the VSCode marketplace.
174
+
175
+
For beta releases, we just do the last step and ask folks to try it.
0 commit comments