Skip to content

Commit 090183b

Browse files
authored
Merge pull request #36 from rescript-lang/rescript-package-compat
Rescript package compat
2 parents 9d99034 + 605b72b commit 090183b

File tree

348 files changed

+9190
-37598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

348 files changed

+9190
-37598
lines changed

.gitignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ node_modules
3030
test/**/*.js
3131
doc/tags
3232

33-
!rescript-vscode/extension/node_modules
34-
!rescript-vscode/extension/server/node_modules/
35-
!rescript-vscode/extension/server/darwin/rescript-editor-support.exe
36-
!rescript-vscode/extension/server/linux/rescript-editor-support.exe
37-
!rescript-vscode/extension/server/win32/rescript-editor-support.exe
33+
# We don't need that file
34+
server/analysis_binaries/README.md
3835

39-
rescript-vscode/extension/server/node_modules/.bin/
36+
# We need to vendor node_modules and all the executables
37+
!server/node_modules/
38+
!server/analysis_binaries/darwin-run.exe
39+
!server/analysis_binaries/linux-run.exe
40+
!server/analysis_binaries/win32-run.exe
4041

4142
examples/**/node_modules
4243
examples/**/lib

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
## master
44

5+
**Improvements:**
6+
7+
- Add support for the new `rescript` npm package. This version will handle both, `bs-platform` and `rescript` projects.
8+
- Tip: Running `:RescriptInfo` will show you if the plugin is running in `legacy` (`bsc.exe` / `bsb.exe`) or `modern` (`rescript.exe`) mode
9+
- Updated vendored rescript-vscode server to `1.1.1` (see changes [here](https://github.com/rescript-lang/rescript-vscode/blob/master/CHANGELOG.md#110))
10+
11+
**Breaking Changes:**
12+
13+
We slimmed down our vendored LSP code and changed the binary paths. Within your `CocConfig`, change your server path accordingly:
14+
15+
```diff
16+
"languageserver": {
17+
"rescript": {
18+
"enable": true,
19+
- "module": "~/.config/nvim/plugged/vim-rescript/rescript-vscode/extension/server/out/server.js",
20+
+ "module": "~/.config/nvim/plugged/vim-rescript/server/out/server.js",
21+
"args": ["--node-ipc"],
22+
"filetypes": ["rescript"],
23+
"rootPatterns": ["bsconfig.json"]
24+
}
25+
}
26+
```
27+
28+
We also renamed the following plugin commands:
29+
30+
- `:RescriptBuildWorld` to `:RescriptBuildWithDeps`
31+
- `:RescriptCleanWorld` to `:RescriptBuildWithDeps`
32+
533
## 1.4.0
634

735
**Improvements:**

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ We are currently vendoring rescript-vscode to provide all the binaries + LSP for
6868
First, `curl` the tagged zip bundle from the `rescript-vscode` GH releases:
6969

7070
```
71-
curl -L https://github.com/rescript-lang/rescript-vscode/releases/download/1.0.0/rescript-vscode-1.0.0.vsix -o rescript-vscode-1.0.0.zip
71+
curl -L https://github.com/rescript-lang/rescript-vscode/releases/download/1.1.1/rescript-vscode-1.1.1.vsix -o rescript-vscode-1.1.1.zip
7272
```
7373

7474
Unzip it and replace the `rescript-vscode` directory. Like this:
7575

7676
```
77-
unzip rescript-vscode-1.0.0.zip -d rescript-vscode-1.0.0
78-
rm -rf rescript-vscode
77+
unzip rescript-vscode-1.1.1.zip -d rescript-vscode-1.1.1
78+
rm -rf server
7979
80-
mv rescript-vscode-1.0.0 rescript-vscode
80+
mv rescript-vscode-1.1.1/extension/server server
8181
```
8282

8383
Lastly:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ After the installation, open your coc config (`:CocConfig`) and add the followin
6969
"languageserver": {
7070
"rescript": {
7171
"enable": true,
72-
"module": "~/.config/nvim/plugged/vim-rescript/rescript-vscode/extension/server/out/server.js",
72+
"module": "~/.config/nvim/plugged/vim-rescript/server/out/server.js",
7373
"args": ["--node-ipc"],
7474
"filetypes": ["rescript"],
7575
"rootPatterns": ["bsconfig.json"]

0 commit comments

Comments
 (0)