microsoft / microsoft/TypeScript

Provide support for comma insertion with snippet completion

Open
#54,731 0 comments 2 reactions 1 assignee View on GitHub

@navya9singh is already working on this.

Since Jun 21, 2023.

Domain: LS: Completion Lists Rescheduled Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

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() {
        
    },
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.