Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dstotijn committed Sep 20, 2022
1 parent d2d7e89 commit 71591ae
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/lib/monaco-editor/json.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,39 @@ class JSONWorker {
},
},
schemaRequestService: createData.enableSchemaRequest ? defaultSchemaRequestService : undefined,
contributions: [
{
async getInfoContribution() {
return [];
},
async collectDefaultCompletions() {
return;
},
async collectPropertyCompletions(uri, location, currentWord, addValue, isLast, result) {
if (location.length === 0 || location[0] !== "customer") {
return;
}
result.add({
label: "Acme, Inc.",
insertText: JSON.stringify(
{
name: "Acme, Inc.",
tax_id: {
country: "ES",
code: "54387763P",
},
},
null,
4
).slice(1, -1), // Strip the surrounding JSON object braces.
});
return;
},
async collectValueCompletions() {
return;
},
},
],
});
this._languageService.configure(this._languageSettings);
}
Expand Down

0 comments on commit 71591ae

Please sign in to comment.