microsoft / microsoft/TypeScript

Provide support for comma insertion with snippet completion

Offen
#54,731 0 Kommentare 2 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@navya9singh arbeitet bereits daran.

Seit 21.6.2023.

Domain: LS: Completion Lists Rescheduled Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.4k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.