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
-[Writing a TextMate Grammar: Some Lessons Learned](https://www.apeth.com/nonblog/stories/textmatebundle.html)
64
68
@@ -132,6 +136,7 @@ We currently do that; we wish we aren't.
132
136
It's possible to open files from different projects into the same editor instance. In that case, also read _that_ file's project's `.compiler.log`.
133
137
134
138
The bad alternatives are:
139
+
135
140
- Not show that file's project's errors. That's wrong for several reasons (looks like the file has no error, assumes an editor window has a default project, etc.).
136
141
- Show only that file's error. That's just weird, the errors are already read from that project's `.compiler.log`. Might as well show all of them (?).
137
142
@@ -149,9 +154,10 @@ Drawbacks:
149
154
## Format
150
155
151
156
To find the location of `bsc.exe` to run the formatter:
157
+
152
158
- Search in the file's directory's `node_modules/bs-platform/{platform}/bsc.exe`. If not found, recursively search upward (because [monorepos](https://github.com/rescript-lang/rescript-vscode/blob/0dbf2eb9cdb0bd6d95be1aee88b73830feecb5cc/server/src/utils.ts#L39-L45)).
153
-
- Do **not** directly use `node_modules/.bin/bsc` if you can help it. That's a Nodejs wrapper. Slow startup. We don't want our formatting to be momentarily stalled because some Nodejs cache went cold.
154
-
- `platform` can be `darwin`, `linux`, `win32` or `freebsd`.
159
+
-Do **not** directly use `node_modules/.bin/bsc` if you can help it. That's a Nodejs wrapper. Slow startup. We don't want our formatting to be momentarily stalled because some Nodejs cache went cold.
160
+
-`platform` can be `darwin`, `linux`, `win32` or `freebsd`.
155
161
156
162
### Formatting Newline
157
163
@@ -163,9 +169,16 @@ The errors returned from `bsc.exe -format` should be discarded; in theory, they
163
169
164
170
In the future, we should consier showing the format errors when `.compiler.log` isn't found.
165
171
166
-
## Release
172
+
## Analysis bin
173
+
174
+
Analysis bin is what we currently call the OCaml code that does deeper language related analysis, and that powers most of the language specific functionality like hovers, completion, and so on. Here's a list of PRs and other resources you can have a look at if you're interested in contributing to the analysis bin:
175
+
176
+
- Implementing "code lens" for function definitions. PR + commits have a bunch of comments intended to be educational as to what's done where, and why. https://github.com/rescript-lang/rescript-vscode/pull/513
177
+
- Cristiano fixes a bug where autocomplete wasn't working in switch branches, because the analysis did not cover that context. Contains a bunch of good comments on how the test setup works, etc. https://github.com/rescript-lang/rescript-vscode/pull/415
167
178
168
-
Currently the release is vetted and done by @chenglou.
179
+
We're happy to gather more resources over time here, including more in-depth getting started guides.
180
+
181
+
## Release
169
182
170
183
1. Bump the version properly in `package.json` and `server/package.json` and their lockfiles. Commit and push the version bump.
171
184
2. Make sure @ryyppy is aware of your changes. He needs to sync them over to the vim plugin.
0 commit comments