async doComplete()

in src/ssmLanguageService.ts [108:125]


    async doComplete(
        document: JsonLS.TextDocument,
        position: JsonLS.Position,
        jsonDocument: JsonLS.JSONDocument
    ): Promise<JsonLS.CompletionList | null> {
        if (document.languageId === "ssm-json") {
            return await this.jsonLanguageService.doComplete(document, position, jsonDocument);
        } else {
            const completionList = await this.yamlLanguageService.doComplete(document, position, false);

            const prefixRange = JsonLS.Range.create(JsonLS.Position.create(position.line, 0), position);
            const prefix = document.getText(prefixRange);
            const fixYamlIndentationFlag = prefix.trimLeft().startsWith("-");
            fixYamlCompletionList(completionList.items, fixYamlIndentationFlag);

            return completionList;
        }
    }