Skip to content

Commit

Permalink
feat: add volar.vueserver.fullCompletionList setting (#2422)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Feb 19, 2023
1 parent e9658b9 commit 36c81b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vscode-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,11 @@
"default": [],
"description": "List any additional file extensions that should be processed as Vue files (requires restart)."
},
"volar.vueserver.fullCompletionList": {
"type": "boolean",
"default": false,
"description": "Enable this option if you want to get complete CompletionList in language client. (Disable for better performance)"
},
"volar.codeLens.references": {
"type": "boolean",
"default": true,
Expand Down
6 changes: 6 additions & 0 deletions packages/vscode-vue/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ async function doActivate(context: vscode.ExtensionContext, createLc: CreateLang
|| e.affectsConfiguration('volar.vueserver.additionalExtensions')
|| e.affectsConfiguration('volar.vueserver.maxFileSize')
|| e.affectsConfiguration('volar.vueserver.configFilePath')
|| e.affectsConfiguration('volar.vueserver.fullCompletionList')
) {
requestReloadVscode();
}
Expand Down Expand Up @@ -246,6 +247,10 @@ function additionalExtensions() {
return vscode.workspace.getConfiguration('volar').get<string[]>('vueserver.additionalExtensions') ?? [];
}

function fullCompletionList() {
return vscode.workspace.getConfiguration('volar').get<boolean>('vueserver.fullCompletionList');
}

function getFillInitializeParams(featuresKinds: LanguageFeaturesKind[]) {
return function (params: lsp.InitializeParams) {

Expand Down Expand Up @@ -328,6 +333,7 @@ function getInitializationOptions(
tokenTypes: ['component'],
tokenModifiers: [],
},
fullCompletionList: fullCompletionList(),
};
return initializationOptions;
}

0 comments on commit 36c81b6

Please sign in to comment.