Repository navigation
Description
The same server in other editors, as generated data. Helix, Sublime Text (LSP package), Kate, Neovim and Emacs start a language server from a few lines of configuration: the command, the file types, the root markers. Those few lines are generated from one t27 record, so no editor gets a hand-written plugin. Parked deliberately: tree-sitter grammars, the Zed extension (it needs a Rust-to-wasm extension to register a server) and the IntelliJ plugin (Kotlin); all need hand-written foreign code and wait for a t27 path. Part of the LSP epic, Refs #12209 (wave 4, clients). Only .t27: no code in any other language, not even scratch probes or a loader; see skill only-t27.
A config file for an editor is a format a resolver parses, so it is machinery: generate it from the record, never hand-write it into a second home for the truth (rule: own-language-first, qualification 1). The Neovim and Emacs snippets are one line of Lua and Lisp each; they are emitted by t27c from the record and never edited by hand. If t27c cannot write arbitrary text files, that is a compiler gap: file it on #5980 with a minimal .t27 repro and park those two renderers.
Depends on specs/lsp/main.t27 (the command line) and specs/lsp/config.t27 (settings and their defaults).
Prior art:
- nvim-lspconfig server entries: command, filetypes, root_dir markers: https://github.com/neovim/nvim-lspconfig
- Helix
languages.toml: https://docs.helix-editor.com/languages.html - Emacs eglot server registration: https://github.com/joaotavora/eglot
- Sublime Text LSP package, client configuration: https://lsp.sublimetext.io/client_configuration/
- Kate LSP client, server settings: https://docs.kde.org/stable_kf6/en/kate/kate/kate-application-plugin-lspclient.html
Boundary
- specs/lsp/editors.t27
User Scenarios
- Given the record for the t27 server (name, command
t27c lsp, file typet27, extension.t27, root markerst27.tomlandspecs, comment token;), when the generator runs, then it writes one snippet per editor: Helixlanguages.toml, Sublime LSP client settings, Kate server settings, Neovimvim.lsp.configand the Emacs eglot entry. - Given the settings in
specs/lsp/config.t27, when the generator runs, then each snippet carries the same defaults and key names, written in the editor's own settings format. - Given an editor snippet is changed by hand in the docs, when the check runs, then it fails and names the snippet and the line that differs.
- Given the user opens the docs page, when it renders, then every snippet is the generated one, labelled
generated from specs/lsp/editors.t27. - Given an editor cannot express a setting, when the snippet is generated, then the setting is omitted with a comment saying which one and why.
Requirements
- FR-001: The module MUST hold the server record and one renderer per editor as pure t27 functions returning the snippet text, and the snippet files MUST be produced by
t27cfrom the spec (the command is recorded in the issue). - FR-002: A check MUST regenerate every snippet and compare with the file on disk; a difference is a failure with a unified diff in the message.
- FR-003: Each renderer MUST have a golden test of its full output for the same record, and the golden text is part of the test, not an external file.
- FR-004: The module MUST NOT contain plugin logic for any editor; if an editor needs logic, it is listed in the issue as parked with the reason.
- FR-005: The comment token and the root markers MUST be read from the language definition used by the syntax-highlighting grammar (vscode-trinity-swe: .t27 syntax highlighting is wrong (every ; starts a comment) #12198's grammar data), not repeated.
Success Criteria
- At least 20 tests in
specs/lsp/editors.t27pass, run on the lab witht27c test-report(exit 0), one golden test per editor and a stale-snippet negative control. - The snippets are generated on the lab; the command and the list of files written are pasted in the issue.
git diff --name-only masterlists onlyspecs/lsp/editors.t27and generated snippet files named in the issue (0 hand-written files in other languages).
Activity
[-]LSP: editor configs for Neovim, Helix, Emacs and Zed as generated data (specs/lsp/editors.t27)[/-][+]LSP: editor configs for Helix, Sublime, Kate, Neovim and Emacs as generated data (specs/lsp/editors.t27)[/+]gHashTag commentedon Nov 17, 2026
Editor configs for Helix, Sublime, Kate, Neovim and Emacs are generated data, not .t27 specs. Covered by existing LSP client/server specs.