Note
The language server is a long-running process. Editors start it automatically. Use Ctrl+C to stop it if you run it from the command line.
Tier 2 · Story 19Complete
The language_server action starts the Tyhp Language Server Protocol (LSP) server. It uses the same parse, bind, and check pipeline as tyhp lint, then keeps that analysis live as you edit.
tyhp language_server [options]
The language server is a long-running process that communicates with your editor over stdin/stdout. When it starts, it loads the tyhp.json given by --tyhp-project (or ./tyhp.json), discovers source and tyhpdef files, and builds an initial representation of the project. As you edit files, it incrementally re-processes changed documents (debounced) and publishes diagnostics.
--stdio is accepted and is the default transport. --tcp and --pipe are listed by tyhp help but are not implemented: passing either flag prints an error and exits.
tyhp lint, updated as you type.completionItem/resolve).textDocument/prepareRename and textDocument/rename).( and ,).use statements, plus organize-imports.use statements and normalizes indentation. Range formatting normalizes indentation only (it does not sort use statements).The Tyhp Language extension for VS Code / Cursor and the Tyhp Language plugin for PhpStorm start one tyhp language_server process per owned tyhp.json:
tyhp language_server --quiet --stdio --tyhp-project=<path-to-tyhp.json>
Point tyhp.path at your tyhp CLI if it is not on PATH. Extra tokens go in tyhp.languageServer.args.
Any other LSP client can launch the same command. Editors with LSP support include Sublime Text (LSP package), Neovim (nvim-lspconfig), Emacs (lsp-mode or eglot), and Helix.
--tyhp-project=<path> — Path to the tyhp.json project file. The language server uses this to discover source files and configuration.--stdio — Communicate via stdin/stdout (default; the only transport implemented).--quiet — Suppress the startup banner (useful when the editor captures stderr).--pid-file=<path> — Write the process id to this file while the server is running. Opt-in; nothing is written by default.--help — Display help (tyhp help --subject=language_server).The language server is a long-running process. Editors start it automatically. Use Ctrl+C to stop it if you run it from the command line.