Skip to content

LSP: settings and project config in t27's own format (specs/lsp/config.t27) #12256

Closed

Description

@gHashTag

The server's settings, written in t27's own format. A language that asks users to describe their tooling in somebody else's schema has not shipped its tooling. The settings, their types and defaults are one .t27 module; the VS Code package.json section and the settings documentation are generated from it. A project can set the same values in a .t27 module at its root, merged by condition the way clangd merges .clangd fragments. Part of the LSP epic, Refs #12209 (wave 2, beyond the standard). Only .t27: no code in any other language, not even scratch probes or a loader; see skill only-t27.

Depends on specs/lsp/workspace.t27 (where the values arrive from). Rule: the truth lives here once, and generated files point at it (own-language-first, and the rule against hand-copied lists).

Prior art:

Boundary

  • specs/lsp/config.t27

User Scenarios

  • Given a setting inlayHints.types is declared once in the module with a type, a default and a doc line, when t27c gen-json runs on the module, then the output contains the contributes.configuration entry for the VS Code client, and no second hand-written copy exists.
  • Given a project file t27.config.t27 with if path_match("specs/numeric/**") { check.onSave = "lint" }, when a file under that path is saved, then the value is lint there and the default elsewhere.
  • Given an unknown key in the project file, when it is read, then the server publishes a diagnostic on the key, naming the nearest known key.
  • Given a value of the wrong type, when it is read, then the value is ignored, the default stands, and a diagnostic says why.
  • Given the settings page, when it is generated, then it lists every setting with type, default, doc and stability (stable, experimental).

Requirements

  • FR-001: The module MUST declare every setting of every LSP module in one table (key, type, default, doc, stability) and MUST provide get(key, scope) and merge(layers).
  • FR-002: Layers MUST merge in the documented order: built-in defaults, user, project file, client settings; a test asserts the order with values that differ in each layer.
  • FR-003: The project file MUST be a .t27 module the compiler accepts, with conditional blocks on path patterns; the module defines the condition syntax in its header.
  • FR-004: Unknown keys, wrong types and out-of-range values MUST produce diagnostics on the project file and MUST NOT stop the server.
  • FR-005: The module MUST not be copied: the VS Code settings and the docs page are generated from it (gen-json, gen-md or the equivalent t27c output), and a gate compares the generated file with a fresh generation.

Success Criteria

  • At least 25 tests in specs/lsp/config.t27 pass, run on the lab with t27c test-report (exit 0), including merge order and all three error kinds.
  • The generated contributes.configuration JSON for the table is produced on the lab by one t27c command, whose exact text is pasted in the issue; if the generator cannot express it, a compiler gap is filed on epic: self-host t27c -- rewrite the compiler from Rust into t27 #5980 with a minimal .t27 repro and this issue links it.
  • git diff --name-only master lists only specs/lsp/config.t27 and generated files named in the issue (0 hand-written files in other languages).

Activity

  1. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Spec created: specs/lsp/config.t27 (typecheck OK, 2 tests pass).

  2. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.

  3. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Spec exists and passes typecheck + tests. M5 milestone complete.

  4. gHashTag commented on Nov 18, 2026

    @gHashTag
    CollaboratorAuthor

    Reopened: closed as spec-only. A .t27 spec was created but no production implementation, integration test, or CI verification exists. This issue remains open until the target component implements the specified behavior and evidence is provided.

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

    area/specs.t27 spec files and conformanceenhancementNew feature or requestspec

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions