Skip to content

[M10] Implement LSP server as a thin protocol adapter #67

Description

@Teakowa

Parent: #27

Depends on: #63, #65, #66

Planning status: settled by the #75 contract — true in-flight cancellation is
deferred; stale-result suppression is the M10 requirement.

Goal

Expose Wright's editor-neutral language services through standard LSP without making LSP protocol types or lifecycle the compiler architecture.

Scope

  • Implement LSP initialize/capability negotiation and document/workspace lifecycle mapping.
  • Map diagnostics, hover, definition, references, completion, rename, and semantic tokens to the Wright-owned language-service APIs.
  • Map document versions, stale-result suppression, errors, and source edits correctly between LSP and core contracts. In-flight request cancellation is explicitly deferred (see [M10 planning] Reconcile cancellation and responsive-analysis contracts #75) and is not an M10 requirement.
  • Support stdio as the baseline server transport unless evidence justifies more.
  • Keep server state thin over the shared workspace/session model.
  • Add protocol-level integration tests using actual LSP messages.

Non-goals

Acceptance criteria

  • Standard LSP clients can consume the supported Wright language-service capabilities.
  • Protocol handlers are thin mappings over editor-neutral services and have no duplicate semantic implementation.
  • Version handling prevents stale responses from being applied as current results. This is distinct from in-flight request cancellation, which is explicitly deferred per [M10 planning] Reconcile cancellation and responsive-analysis contracts #75.
  • The LSP server can be tested independently through protocol messages.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions