Skip to content

Commit

Permalink
feat: use vscode html completion configs
Browse files Browse the repository at this point in the history
close #1139
  • Loading branch information
johnsoncodehk committed Apr 3, 2022
1 parent 2b2ea42 commit 93f9e9c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/vue-language-service/src/commonPlugins/html.ts
Expand Up @@ -30,12 +30,15 @@ export default function (options: {
triggerCharacters: ['.', ':', '<', '"', '=', '/'],

async doComplete(document, position, context) {
return worker(document, (htmlDocument) => {
return worker(document, async (htmlDocument) => {

const configs = await useConfigurationHost()?.getConfiguration<html.CompletionConfiguration>('html.completion', document.uri);

if (options.documentContext) {
return htmlLs.doComplete2(document, position, htmlDocument, options.documentContext, /** TODO: CompletionConfiguration */);
return htmlLs.doComplete2(document, position, htmlDocument, options.documentContext, configs);
}
else {
return htmlLs.doComplete(document, position, htmlDocument, /** TODO: CompletionConfiguration */);
return htmlLs.doComplete(document, position, htmlDocument, configs);
}
});
},
Expand Down

0 comments on commit 93f9e9c

Please sign in to comment.