Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

LSP: add full-mode lexical and member completion for live editing

Aperta
#1,978 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@nickna ci sta già lavorando.

Dal 8/10/2026.

  • #1982 di @nickna — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
1/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, typescript

Direzione di ricerca

The implementation is reported complete on codex/standalone-editor-core, pending PR/merge, so first check whether that work has landed before attempting anything. For context, read the linked language-server behavior, syntax/recovery contract, and semantic query contract documents; the issue names no specific source or test files. Done is the described full-mode semantic completion behavior, but this is extensive, already-implemented work rather than a suitable first contribution.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Parent epic: #1390. Depends on #1391, #1392, #1975, #1976 and the annotation/public-callable proof added in #1977.

Outcome

A standalone user gets checker-backed completions while typing a lexical identifier or receiver member, including unfinished receiver. and receiver?. buffers. This is a bounded editing feature with exact plain text edits.

Semantic and recovery boundaries

  • Project names and members from the shared immutable semantic queries. Preserve local import spellings, actual checker visibility, TDZ/shadowing, accessibility, private context and static/instance facets. Type-only namespace exports must not appear in value completion, including flattened module namespace representations and mixed-facet unions.
  • A completed syntax context uses its checked receiver/scope. An unfinished member operator uses a fresh checked cursor graph through the normal configured ModuleResolver pipeline; never check a published AST or parse-only cached artifact again, or borrow an earlier successful receiver.
  • Preserve paths, declaration preference, project libraries, reference directives, dirty dependencies, strictness, decorators and JSX pragmas. Validate seed ownership/request stamp/path/currentness and replay captured reads before reconstruction. A configured cursor build that cannot produce a faithful model supplies no result.
  • Cursor graphs share ordinary admission/coalescing/cancellation and the eight-entry/64 MiB estimated cache budget, with an additional four completed cursor-entry cap. Cursor entries have no ordinary document aliases and do not retain their completed base AST through the cache key.
  • Lexical completion refuses documents with parse errors because a discarded local declaration can hide an outer binding. Recovery remains bounded to the caret gap; arbitrary broken enclosing scopes are unsupported.

Work

  • Extend CompletionHandler with full-mode semantic fallback while preserving GUI/decorator priority. Interop-only supplies its existing SharpTS-specific results and starts no general semantic work.
  • Offer checked visible names in supported value/type contexts, including parameters, import aliases and block scope.
  • Offer known receiver members for source/inherited/generic/static classes, accessible private/protected members, namespaces and structural/interface/record receivers. Do not invent source member identities or dynamic/index-signature names.
  • Add isolated checked cursor analysis for unfinished member access through the configured program, preserving resolver/configuration/metadata fidelity and cache lifecycle.
  • Produce at most 256 deterministic deduplicated plain text items, bounded details and exact whole-identifier textEdits, including the suffix after a middle-of-identifier cursor.
  • Honor client item-kind value sets, retain all existing triggers, and add ./? only in full mode. Missing hover/completion capability objects must initialize safely.
  • Support manual invocation and valid identifier names; omit quoted/computed/numeric-key rewrite completions.
  • Observe cancellation and final source/dependency/metadata currentness. Unavailable scope/receiver proof returns no guessed candidates.

Acceptance and verification

  • Typing tests cover partial lexical names, empty/optional member suffixes, nested calls, this/super, static access, generics and imported namespaces/classes.
  • Scope tests cover same-name value/type facets, shadowing, TDZ, parameters, aliases and private/protected access. Namespace type-only exports are omitted from value completion.
  • Position tests cover prefix-in-the-middle edits, Unicode/surrogate pairs, LF/CRLF and TSX, applying edits and verifying resulting syntax.
  • Negative cases cover any/unresolved/unvisited receivers, comments/literals, nonmember dots, JSX raw text, unsupported scopes and parser-discarded shadowing locals.
  • Cursor lifecycle tests cover exact configuration/resolution/directive fidelity, fresh ownership, invalid/foreign/stale seeds, independently owned metadata, cancellation peers, invalidation and entry/byte limits.
  • Real stdio clients cover ordinary/unfinished completion, trigger/mode isolation, restricted kinds with and without Text fallback, dirty dependencies/close restoration, applied edits and retained decorators. Existing GUI priority is covered by handler tests.
  • Repeated unchanged requests reuse completed analyses; enumeration is bounded and does not scan all bindings for each item.

Deliberate limits

Unused lazy aliases have no typed item until the checker resolves them; completion does not force resolution. An existing checker path can return any from a source-class annotated function despite its declared return signature, so that call receiver supplies no members; inferred class returns and checked structural returns are supported. Bare this.# fails the ordinary lexer; this. can offer accessible private names and written partial private identifiers are supported. Arbitrary broken braces and lexical parse recovery remain unavailable.

Auto-imports, path completion, snippets/call templates, quoted-key rewrites, ordinary JSX tags/attributes beyond existing GUI support, and a full keyword engine are outside this delivery.

Implementation verification — 2026-10-07

Implemented on codex/standalone-editor-core, pending PR/merge. Release build passed with zero warnings/errors. All 3,318 affected parser/checker/LSP/module/configuration/reference/debug-adapter tests passed, including 99 new focused cases. TypeScript smoke passed 32 corpus cases across 17 harness tests; targeted Test262 passed 9 cases.

scripts/test-semantic-completion.mjs passed four real stdio clients: unrestricted full, Text-only full, Method-only full (unsupported kinds omitted), and restricted interop-only. These verify unfinished dot/optional access, concurrent identical results, exact applied UTF-16/CRLF edits, dirty inherited members and close restoration, refusals, mode triggers and decorator preservation. scripts/test-semantic-hover.mjs and scripts/test-analysis-snapshots.mjs also passed, including actual cancellation and a surviving fresh request.

See the language-server behavior, syntax/recovery contract, and semantic query contract.

PR and release status

The implementation is committed on codex/standalone-editor-core and is included in PR #1982. Local verification is complete; required GitHub CI is executing. This ticket remains open pending CI and merge. The checklist describes delivery acceptance rather than a claim that this work has been released.

Lingua principale
C#
Stelle
156
Fork
4
Merge medio
2h 32m
PR unite (30g)
177

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nickna/SharpTS

Tutte le issue di nickna/SharpTS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.