Skip to content

Provide support for comma insertion with snippet completion #54731

Open
@navya9singh

Description

@navya9singh

Bug Report

Support comma insertion with snippet completion

🔎 Search Terms

object literal method snippet

💻 Code

interface T {
    aaa: string;
    foo(): void;
}

const obj: T = {
    aaa: ""
    /**/
}

🙁 Actual behavior

const obj: T = {
    aaa: ""
    foo() {
        
    },
}

On selecting the completion that inserts just foo, the comma gets inserted, but on selecting the snippet completion foo(), the comma is not inserted. This happens because both the comma insertion and snippet completion have their own CompletionSource.

🙂 Expected behavior

const obj: T = {
    aaa: "",
    foo() {
        
    },
}

Metadata

Metadata

Assignees

Labels

Domain: Completion ListsThe issue relates to showing completion lists in an editorRescheduledThis issue was previously scheduled to an earlier milestoneSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions