Skip to content

Suggestions not accepted when using commit characters #31244

@OliverJAsh

Description

@OliverJAsh
Contributor
  • VSCode Version: 1.33.1
  • OS Version: 10.14.4

Steps to Reproduce:

  1. mkdir test
  2. code --disable-extensions --user-data-dir temp test
  3. Create new JS file
const mySpecialVar = 1;
const foo = mySpec<cursor>

When suggestions appear, press ; (commit character).

Expected: suggestion is accepted + ; is inserted.
Actual: ; is inserted.

OTOH, this does work as expected:

const mySpecialVar = 1;
const foo = 1 + mySpec<cursor>

Does this issue occur when all extensions are disabled?: Yes/No

Activity

self-assigned this
on May 2, 2019
transferred this issue frommicrosoft/vscodeon May 3, 2019
mjbvz

mjbvz commented on May 3, 2019

@mjbvz
Contributor

The root cause of this is that the completion info at this location returns isNewIdentifierLocation: true so we disable all commit characters.

We could either look into fixing this case (although I'm not sure if it would regress some other completion behavior), or add commit characters to the tsserver #27623

removed their assignment
on May 3, 2019
mjbvz

mjbvz commented on May 3, 2019

@mjbvz
Contributor

Alternatively, we could always treat ; as a commit character. One case where that could possibly cause issues is declaring a property or method in class:

class Foo {
   b|
}
added
Domain: Completion ListsThe issue relates to showing completion lists in an editor
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.
SuggestionAn idea for TypeScript
on May 8, 2019
duzenko

duzenko commented on May 18, 2023

@duzenko
added
CommittedThe team has roadmapped this issue
and removed
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.
on Mar 27, 2024

5 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CommittedThe team has roadmapped this issueDomain: Completion ListsThe issue relates to showing completion lists in an editorFix AvailableA PR has been opened for this issueSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

    Participants

    @OliverJAsh@duzenko@weswigham@RyanCavanaugh@mjbvz

    Issue actions

      Suggestions not accepted when using commit characters · Issue #31244 · microsoft/TypeScript