@codingame/monaco-vscode-api 1.67.6 → 1.68.0

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 CHANGED
@@ -1,8 +1,17 @@
1
1
  # @codingame/monaco-vscode-api · [![monthly downloads](https://img.shields.io/npm/dm/@codingame/monaco-vscode-api)](https://www.npmjs.com/package/@codingame/monaco-vscode-api) [![npm version](https://img.shields.io/npm/v/@codingame/monaco-vscode-api.svg?style=flat)](https://www.npmjs.com/package/@codingame/monaco-vscode-api) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/codingame/monaco-vscode-api/pulls)
2
2
 
3
- [NPM module](https://www.npmjs.com/) that respects the vscode api and redirect calls to monaco editor.
3
+ [NPM module](https://www.npmjs.com/) that implements the VSCode api and redirects calls to Monaco editor.
4
4
 
5
- Some features not supported by monaco (type hierarchy, call hierarchy...) can be implemented by hands:
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 extensions:
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
-