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
Copy file name to clipboardExpand all lines: docs/customization/plug-points/editor-monaco-language-apidom.md
+42-4Lines changed: 42 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,43 @@
1
1
# editor-monaco plug points
2
2
3
+
## Configuring web worker capabilities
4
+
5
+
Worker accepts configuration for a language service via ApiDOM Context configuration object.
6
+
By default, this configuration looks like this:
7
+
8
+
```js
9
+
{
10
+
validatorProviders: [],
11
+
completionProviders: [],
12
+
performanceLogs:false,
13
+
logLevel:apidomLS.LogLevel.WARN,
14
+
defaultLanguageContent: {
15
+
namespace:'asyncapi',
16
+
},
17
+
completionContext: {
18
+
maxNumberOfItems:100,
19
+
enableLSPFilter:false,
20
+
},
21
+
}
22
+
```
23
+
24
+
If you want to override the default ApiDOM Context configuration object, you need to pass `apiDOMContext` option to the `EditorMonacoLanguageApiDOM` plugin.
25
+
26
+
```js
27
+
EditorMonacoLanguageApiDOM({
28
+
createData: {
29
+
apiDOMContext: {
30
+
completionContext: {
31
+
enableLSPFilter:true, // enables "strict" word filtering (instead of default Monaco fuzzy matching; https://github.com/swagger-api/apidom/pull/2954)
32
+
},
33
+
},
34
+
},
35
+
});
36
+
```
37
+
38
+
> NOTE: note that the provided ApiDOM Context configuration object is merged with default ApiDOM Context configuration object
39
+
using [deep-extend](https://www.npmjs.com/package/deep-extend) npm package.
40
+
3
41
## Extending web worker capabilities
4
42
5
43
`editor-monaco-language-apidom` comes with implementation of `apidom` language.
@@ -10,14 +48,14 @@ The plugin comes with `apidom.worker` utilizing ApiDOM capabilities.
10
48
11
49
Dynamic extension happens during runtime, and we recommend to use it only for simple use-cases.
12
50
13
-
First thing we need to do is to pass a `customApiDOMWorkerPath` option to the `EditorMonaco` plugin.
51
+
First thing we need to do is to pass a `customApiDOMWorkerPath` option to the `EditorMonacoLanguageApiDOM` plugin.
0 commit comments