Skip to content

Commit

Permalink
feat(monaco-language-apidom): move completionContext to APIDomContext
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Jul 17, 2023
1 parent 6469cf0 commit 36f86bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export class ApiDOMWorker {
defaultLanguageContent: {
namespace: 'asyncapi',
},
completionContext: {
maxNumberOfItems: 100,
},
};

constructor(ctx, createData) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import Provider from './Provider.js';

class CompletionItemProvider extends Provider {
#completionContext = {
maxNumberOfItems: 100,
};

async #getCompletionList(vscodeDocument, position) {
const worker = await this.worker(vscodeDocument.uri);

try {
return await worker.doComplete(
vscodeDocument.uri.toString(),
this.codeConverter.asPosition(position),
this.#completionContext
this.codeConverter.asPosition(position)
);
} catch {
return undefined;
Expand Down

0 comments on commit 36f86bb

Please sign in to comment.