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

[typescript-language-features] Add includeCompletionsWithClassMemberSnippets preference #136045

Merged
merged 2 commits into from
Oct 28, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions extensions/typescript-language-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,12 @@
"default": "allOpenProjects",
"markdownDescription": "%typescript.workspaceSymbols.scope%",
"scope": "window"
},
"typescript.suggest.includeCompletionsWithClassMemberSnippets": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually one quick note, I am going to split this into two settings: one for JS and one for TS

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add one for JavaScript because we are not supporting this completion feature in JS yet

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right! I forgot about that.

Copy link

@NemoStein NemoStein Nov 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are not supporting this completion feature in JS yet

But it'll come to JS sometime in the future, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think supporting JS would be nice. I created an issue to track that, feel free to upvote it: microsoft/TypeScript#46738

"type": "boolean",
"default": true,
"description": "%configuration.suggest.includeCompletionsWithClassMemberSnippets%",
"scope": "resource"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion extensions/typescript-language-features/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,6 @@
"codeActions.refactor.rewrite.property.generateAccessors.title": "Generate accessors",
"codeActions.refactor.rewrite.property.generateAccessors.description": "Generate 'get' and 'set' accessors",
"codeActions.source.organizeImports.title": "Organize imports",
"typescript.findAllFileReferences": "Find File References"
"typescript.findAllFileReferences": "Find File References",
"configuration.suggest.includeCompletionsWithClassMemberSnippets": "Enable/disable snippet completions for class members. Requires using TypeScript 4.5+ in the workspace"
}
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export default class FileConfigurationManager extends Disposable {
generateReturnInDocTemplate: config.get<boolean>('suggest.jsdoc.generateReturns', true),
includeCompletionsForImportStatements: config.get<boolean>('suggest.includeCompletionsForImportStatements', true),
includeCompletionsWithSnippetText: config.get<boolean>('suggest.includeCompletionsWithSnippetText', true),
includeCompletionsWithClassMemberSnippets: config.get<boolean>('suggest.includeCompletionsWithClassMemberSnippets', true),
allowIncompleteCompletions: true,
displayPartsForJSDoc: true,
...getInlayHintsPreferences(config),
Expand Down