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

Inline Completions: Accept Next Word Should Also Split By Whitespace #167637

Closed
eleanorjboyd opened this issue Nov 29, 2022 · 5 comments · Fixed by #172931
Closed

Inline Completions: Accept Next Word Should Also Split By Whitespace #167637

eleanorjboyd opened this issue Nov 29, 2022 · 5 comments · Fixed by #172931
Assignees
Labels
feature-request Request for new features or functionality inline-completions insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@eleanorjboyd
Copy link
Member

found from TPI: #167421

When I am using Typescript, there is a bit of inconsistency with how it defines a "single word". I am not sure if this is intention behavior that I am seeing for which characters get group together or not. For example the chunks for the following text:
for (const workspace of this.workspaceService.workspaceFolders || []) {

it is grouped like so:

for ( const workspace of this . workspaceService . workspaceFolders || []) {

Where || []) { is much longer and contains spaces.

Not sure what desired behavior is so this could also be expected behavior but wanted to point it out in case there was any inconsistency. Thanks!

@hediet hediet added bug Issue identified by VS Code Team member as probable bug inline-completions labels Nov 30, 2022
@hediet
Copy link
Member

hediet commented Nov 30, 2022

This is by design.

Either the immediate next word is taken or all the text until the next word.

Maybe this should be adjusted, but that depends on how this feature is being used.

@hediet hediet added under-discussion Issue is under discussion for relevance, priority, approach and removed bug Issue identified by VS Code Team member as probable bug labels Nov 30, 2022
@hediet hediet closed this as completed Nov 30, 2022
@eleanorjboyd
Copy link
Member Author

Ah yes it makes sense once you explain it. I feel like the || is a different thought than maybe the entire || []) {.

For example if I wanted that line to say for (const workspace of this.workspaceService.workspaceFolders || Null) { then I would have wanted to select through to for (const workspace of this.workspaceService.workspaceFolders || then type Null instead of selecting for (const workspace of this.workspaceService.workspaceFolders || []) { then deleting to go back and writing Null.

I think either way is fine, it is more just a preference thing and people will quickly adapt to the design as they start using it.

@hediet
Copy link
Member

hediet commented Dec 1, 2022

We could additionally split by whitespace, let me reopen this issue for that.

@hediet hediet reopened this Dec 1, 2022
@hediet hediet added feature-request Request for new features or functionality and removed under-discussion Issue is under discussion for relevance, priority, approach labels Dec 1, 2022
@hediet hediet changed the title Inconsistent Character Completion Groupings Inline Completions: Accept Next Word Should Also Split By Whitespace Dec 1, 2022
@hediet hediet added this to the December 2022 milestone Dec 7, 2022
@hediet hediet modified the milestones: January 2023, February 2023 Jan 26, 2023
hediet added a commit that referenced this issue Jan 31, 2023
hediet added a commit that referenced this issue Feb 1, 2023
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Feb 1, 2023
@hediet hediet added the verification-needed Verification of issue is requested label Feb 20, 2023
@hediet
Copy link
Member

hediet commented Feb 20, 2023

@eleanorjboyd can you verify the fix? Thanks!

@eleanorjboyd
Copy link
Member Author

Looks great! Thanks for the fix!

@eleanorjboyd eleanorjboyd added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Feb 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality inline-completions insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants