# `jadpo lsp`

Run the language server for editors.

Run the language server on standard input and output, for an editor to start: the same errors as jadpo check while you type, hover with signatures, descriptions, the failures a call can produce and who calls it, and go to definition. The project is the one holding the editor's workspace folder.

```text
jadpo lsp
```

## Flags

- `--stdio`: Talk on standard input and output (default)

## On every command

- `--json`: Print data for tools instead of text
- `--help`: Show every flag, with examples
- `--color <when>`: Choose when to use colour

`jadpo lsp --json` writes one JSON document to standard output instead of text, with the same exit code. The document has `schemaVersion`, `command` (`"lsp"`), `ok`, `data` (what the command produced, `null` when it failed) and `diagnostics` (each error with its `rule`, `reason`, `next` and `help`). A command that needs a terminal refuses `--json` and names the flags that do the same job.

## Examples

```text
# Start the language server, as an editor does
jadpo lsp
```

## Errors

- [`cli.lsp_arguments`](../errors/cli.lsp_arguments.md): Language-server command has invalid arguments
