Skip to content

Commit d2a2786

Browse files
committed
Update to rescript-vscode@1.0.4
1 parent c0d8ccc commit d2a2786

12 files changed

Lines changed: 198 additions & 56 deletions

File tree

rescript-vscode/extension.vsixmanifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Language="en-US" Id="rescript-vscode" Version="1.0.1" Publisher="chenglou92"/>
4+
<Identity Language="en-US" Id="rescript-vscode" Version="1.0.4" Publisher="chenglou92"/>
55
<DisplayName>rescript-vscode</DisplayName>
66
<Description xml:space="preserve">The official VSCode plugin for ReScript.</Description>
7-
<Tags>rescript,language-server,ReScript,__ext_res,__ext_resi</Tags>
7+
<Tags>rescript,language-server,snippet,json,ReScript,__ext_res,__ext_resi</Tags>
88
<Categories></Categories>
99
<GalleryFlags>Public</GalleryFlags>
1010
<Badges></Badges>

rescript-vscode/extension/HISTORY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 1.0.4
2+
3+
- Some diagnostics watcher staleness fix.
4+
- Various type hover fixes.
5+
- Monorepo/yarn workspace support.
6+
7+
## 1.0.2
8+
9+
- All the usual features (type hint, autocomplete) now work on `bsconfig.json` too!
10+
- Snippets, to ease a few syntaxes.
11+
- Improved highlighting for polymorphic variants. Don't abuse them please.
12+
113
## 1.0.1
214

315
- Fix temp file creation logic.

rescript-vscode/extension/README.md

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

33
The official VSCode plugin for ReScript.
44

5+
![Screen shot](https://user-images.githubusercontent.com/1909539/101266821-790b1400-3707-11eb-8e9f-fb7e36e660e6.gif)
6+
57
## Prerequisite
68

79
You **must** have `bs-platform 8.3.3` installed locally in your project, through the usual [npm installation](https://rescript-lang.org/docs/manual/latest/installation#integrate-into-existing-js-project). Older versions are not guaranteed to work.
@@ -14,15 +16,19 @@ The plugin activates on `.res` and `.resi` files. If you've already got Reason-L
1416

1517
## Features
1618

17-
- Syntax highlighting (`.res`, `.resi`).
19+
- Supports `.res`, `.resi` and `bsconfig.json`.
20+
- Syntax highlighting.
1821
- Formatting, with caveats:
1922
- Currently requires the file to be part of a ReScript project, i.e. with a `bsconfig.json`.
2023
- Cannot be a temporary file.
2124
- Syntax errors diagnosis (only after formatting).
2225
- Built-in bsb watcher (optional, and exposed explicitly as a pop-up; no worries of dangling build).
23-
- Type diagnosis.
26+
- Type hint.
2427
- Jump to location.
2528
- Autocomplete.
29+
- Snippets to ease a few syntaxes:
30+
- `external` features such as `@bs.module` and `@bs.val`
31+
- `try`, `for`, etc.
2632

2733
### Upcoming Features
2834

rescript-vscode/extension/grammars/rescript.tmLanguage.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"operator": {
195195
"patterns": [
196196
{
197-
"match": "->|\\|\\||&&|\\+\\+|\\*\\*|\\+\\.|\\+|-\\.|-|\\*\\.|\\*|/\\.|/|\\.\\.\\.|\\.\\.|\\|>|===|==|\\^|:=|!|>=|<=",
197+
"match": "->|\\|\\||&&|\\+\\+|\\*\\*|\\+\\.|\\+|-\\.|-|\\*\\.|\\*|/\\.|/|\\.\\.\\.|\\.\\.|\\|>|===|==|\\^|:=|!|>=(?! *\\?)|<=",
198198
"name": "keyword.operator"
199199
}
200200
]
@@ -214,13 +214,16 @@
214214
"name": "variable.function variable.other"
215215
},
216216
{
217-
"match": "(#)(\\.\\.\\.)?[a-zA-Z][0-9a-zA-Z_]*\\b",
217+
"match": "(#)(\\.\\.\\.)?([a-zA-Z][0-9a-zA-Z_]*)\\b",
218218
"captures": {
219219
"1": {
220220
"name": "punctuation.definition.keyword"
221221
},
222222
"2": {
223223
"name": "punctuation.definition.keyword"
224+
},
225+
"3": {
226+
"name": "variable.function variable.other"
224227
}
225228
}
226229
}

rescript-vscode/extension/package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "The official VSCode plugin for ReScript.",
44
"author": "chenglou",
55
"license": "MIT",
6-
"version": "1.0.1",
6+
"version": "1.0.4",
77
"repository": {
88
"type": "git",
99
"url": "https://github.com/rescript-lang/rescript-vscode"
@@ -23,6 +23,18 @@
2323
],
2424
"main": "./client/out/extension",
2525
"contributes": {
26+
"jsonValidation": [
27+
{
28+
"fileMatch": "bsconfig.json",
29+
"url": "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json"
30+
}
31+
],
32+
"snippets": [
33+
{
34+
"language": "rescript",
35+
"path": "./snippets.json"
36+
}
37+
],
2638
"taskDefinitions_unused": [
2739
{
2840
"type": "bsb",
Binary file not shown.
-7.82 MB
Binary file not shown.

rescript-vscode/extension/server/out/constants.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rescript-vscode/extension/server/out/server.js

Lines changed: 38 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rescript-vscode/extension/server/out/utils.js

Lines changed: 26 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)