JSONL LSP
Language server for JSON Lines / NDJSON: per-record diagnostics, formatting, record outlines, hover inspection, and expand/compact code actions.
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for JSONL LSP. The extension's id is jsonl-lsp.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
JSONL LSP for Zed
Language-server support for JSON Lines (.jsonl) and NDJSON (.ndjson) in Zed: per-record diagnostics as you type, document and range formatting, record-oriented document outlines, hover-based record inspection (pretty-printed JSON in a popup), and expand/compact code actions.
This extension runs jsonl-lsp. If a jsonl-lsp executable is available on the worktree's PATH, the extension uses it directly. Otherwise, it installs @sarvagnan/jsonl-lsp with Zed's npm/Node.js support on first use and keeps the package current.
Requirements
The JSONL extension must be installed — it provides the "JSON Lines" language (grammar, highlighting, and file associations) that this server attaches to. Zed will suggest it automatically when you open a .jsonl file.
Install as a development extension
- Open Zed's Extensions view.
- Select Install Dev Extension.
- Choose this
editors/zeddirectory.
You can also run zed: install dev extension from the command palette and select the same directory.
LSP-powered document outlines
Enable language-server document symbols for record-oriented outline entries (one per record, named from its most informative key, with expandable top-level fields):
{ "languages": { "JSON Lines": { "document_symbols": "on" } } }
Record inspection
- Hover any record to see it pretty-printed in a popup.
- Code actions (
cmd-.on a record) offer Expand record into indented JSON and Compact record to one line — expand to read or edit comfortably, then compact back (or undo).
Formatting
jsonl-lsp advertises both documentFormatting and documentRangeFormatting, so Zed's standard formatter settings work for JSON Lines documents:
{
"languages": {
"JSON Lines": {
"formatter": "language_server",
"format_on_save": "on"
}
}
}
If another extension also registers a formatter for JSON Lines, the formatter setting above selects which one is used.
Server configuration
jsonl-lsp accepts initialization options under the jsonl key, forwarded from Zed's standard LSP settings:
{
"lsp": {
"jsonl-lsp": {
"initialization_options": {
"jsonl": {
"allowBlankLines": false,
"finalNewline": "preserve"
}
}
}
}
}