Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add volar.vueserver.fullCompletionList setting #2422

Merged
merged 1 commit into from
Feb 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
}