A Zed editor extension that provides syntax highlighting for JSON Lines (JSONL) and Newline Delimited JSON (NDJSON) files.
JSON Lines is a format for storing structured data with one JSON object per line. Each line is a valid JSON value, making it suitable for streaming and processing large datasets.
{"name": "John", "age": 30}
{"name": "Jane", "age": 25}
{"name": "Bob", "age": 35}
- Syntax highlighting for
.jsonl
and.ndjson
files - Automatic file detection
- Tree-sitter JSON parser for accurate highlighting
- 2-space indentation default
- Performance optimized for large files
-
Clone this repository:
git clone https://github.com/[your-username]/jsonl-syntax cd jsonl-syntax
-
In Zed, open command palette (
Cmd+Shift+P
/Ctrl+Shift+P
) -
Run "zed: install dev extension" and select the
jsonl-syntax
folder
Open any .jsonl
or .ndjson
file in Zed to see syntax highlighting automatically applied.
jsonl-syntax/
├── extension.toml # Extension configuration
├── languages/
│ └── jsonl/
│ ├── config.toml # Language settings
│ └── highlights.scm # Highlighting rules
├── sample.jsonl # Test file
└── validate.py # Validation script
- Edit highlighting rules in
languages/jsonl/highlights.scm
- Modify language settings in
languages/jsonl/config.toml
- Reload extensions in Zed: "zed: reload extensions"
- Test changes with sample files
Contributions are welcome.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This extension uses the tree-sitter-json grammar for parsing. Each JSONL line is treated as a separate JSON document for highlighting purposes.
MIT License - see LICENSE file for details.