@codingame/monaco-vscode-api 1.67.7 → 1.68.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -4
- package/dist/api.amd.js +5095 -6483
- package/dist/api.cjs +5111 -6496
- package/dist/api.js +5102 -6482
- package/dist/services.amd.js +1 -7
- package/dist/services.cjs +1 -7
- package/dist/services.d.ts +50 -53
- package/dist/services.js +0 -2
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
# @codingame/monaco-vscode-api · [](https://www.npmjs.com/package/@codingame/monaco-vscode-api) [](https://www.npmjs.com/package/@codingame/monaco-vscode-api) [](https://github.com/codingame/monaco-vscode-api/pulls)
|
|
2
2
|
|
|
3
|
-
[NPM module](https://www.npmjs.com/) that
|
|
3
|
+
[NPM module](https://www.npmjs.com/) that implements the VSCode api and redirects calls to Monaco editor.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The VSCode api is composed of:
|
|
6
|
+
|
|
7
|
+
- A lot of classes and tools, which are exported the same way as in VSCode.
|
|
8
|
+
- Some features that are supported by Monaco (Language feature registrations...) which are just forwarded to it (with some transformations)
|
|
9
|
+
- Some features that are not supported by Monaco, and in such case:
|
|
10
|
+
- If it's an important feature: we let the user implement it as they wish.
|
|
11
|
+
- If it's some advanced features that don't make a lot of sense on Monaco (debug, tests...), it just throws an error when you try to use it.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
To implement by hands the optional features (type hierarchy, call hierarchy...), you can use the `Services` namespace from `vscode/services`:
|
|
6
15
|
```typescript
|
|
7
16
|
import { Services } from 'vscode/services'
|
|
8
17
|
Services.install({
|
|
@@ -25,7 +34,7 @@ npm install -D @types/vscode
|
|
|
25
34
|
|
|
26
35
|
### Usage
|
|
27
36
|
|
|
28
|
-
Just import it as if you were in a vscode
|
|
37
|
+
Just import it as if you were in a vscode extension:
|
|
29
38
|
|
|
30
39
|
```typescript
|
|
31
40
|
import * as vscode from 'vscode'
|
|
@@ -33,4 +42,3 @@ import * as vscode from 'vscode'
|
|
|
33
42
|
const range = new new vscode.Range(...)
|
|
34
43
|
vscode.languages.registerCompletionItemProvider(...)
|
|
35
44
|
```
|
|
36
|
-
|