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

Provide support for comma insertion with snippet completion #54731

Open
navya9singh opened this issue Jun 21, 2023 · 0 comments
Open

Provide support for comma insertion with snippet completion #54731

navya9singh opened this issue Jun 21, 2023 · 0 comments
Assignees
Labels
Domain: Completion Lists The issue relates to showing completion lists in an editor Rescheduled This issue was previously scheduled to an earlier milestone Suggestion An idea for TypeScript

Comments

@navya9singh
Copy link
Member

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() {
        
    },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Completion Lists The issue relates to showing completion lists in an editor Rescheduled This issue was previously scheduled to an earlier milestone Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants