Skip to content

[typescript-language-features] Use commit characters from tsserver when available - #223541

Merged
Matt Bierner (mjbvz) merged 2 commits into
microsoft:mainfrom
gabritto:commitcharacters
Jul 29, 2024
Merged

Matt Bierner (mjbvz) merged 2 commits into
microsoft:mainfrom
gabritto:commitcharacters

Conversation

@gabritto

Copy link
Copy Markdown
Member

Starting with TS 5.6, TSServer will now send commit characters for completions:
microsoft/TypeScript#59339

@mjbvz Matt Bierner (mjbvz) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good! Should be good to merge soon to get some testing on VS Code insiders

// @ts-expect-error until TS 5.6
let commitCharacters = entry.commitCharacters ?? defaultCommitCharacters;
if (commitCharacters) {
if (context.enableCallCompletions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this logic be moved to the TS side?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In the future, yes. I didn't include that on TS Server for now because I'm still working out what our approach for commit characters will be exactly. It could be that this setting becomes irrelevant and we start offering ( as a commit character on TSServer by default, or we could want more settings. But one way or the other, we'll eventually get rid of this logic on the vscode side.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok that sounds good. I'll go ahead and merge this initial version then

@vscodenpa VS Code Bot (vscodenpa) added this to the August 2024 milestone Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants