{"id":50660078,"url":"https://github.com/php-collective/zed-djot","last_synced_at":"2026-06-19T04:03:00.519Z","repository":{"id":357632076,"uuid":"1237752114","full_name":"php-collective/zed-djot","owner":"php-collective","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-31T14:08:51.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-31T16:03:44.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Tree-sitter Query","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-collective.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-13T13:28:02.000Z","updated_at":"2026-05-31T14:00:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/php-collective/zed-djot","commit_stats":null,"previous_names":["php-collective/zed-djot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/php-collective/zed-djot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fzed-djot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fzed-djot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fzed-djot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fzed-djot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-collective","download_url":"https://codeload.github.com/php-collective/zed-djot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fzed-djot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34516549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-08T02:00:41.114Z","updated_at":"2026-06-19T04:03:00.508Z","avatar_url":"https://github.com/php-collective.png","language":"Tree-sitter Query","funding_links":[],"categories":["Editors \u0026 IDE Support"],"sub_categories":["Zed"],"readme":"# zed-djot\n\nZed editor support for [djot](https://djot.net/), a modern light markup language created by John MacFarlane.\n\nSyntax highlighting tuned to the [`php-collective/djot-php`](https://github.com/php-collective/djot-php) parser feature set. Paired with the [`djot-watch`](https://php-collective.github.io/djot-php/reference/cli#live-preview-djot-watch) CLI, you get a complete write-and-preview loop without leaving Zed.\n\n## Features\n\n- Tree-sitter highlighting for the full djot spec (headings, emphasis, strong, links, images, lists, tables, divs, math, footnotes, attributes, smart typography).\n- Code-block language injections — fenced ` ``` php` blocks get PHP highlighting, ` ``` rust` gets Rust, and so on.\n- YAML highlighting inside `---` frontmatter blocks.\n- LaTeX highlighting inside `$...$` and `$$...$$` math.\n- Bracket matching, autoclose pairs (`[]`, `()`, `{}`, `*`, `_`, `` ` ``).\n- Outline view shows your document's heading structure.\n- Block-comment toggle uses djot's `{% %}` form.\n- djot-php syntax extensions: wikilinks `[[Page]]`, mentions (`@name`), abbreviation definitions `*[KEY]:`, fenced comments `%%%`, boolean attributes `{flag}`, standalone captions `^ text`, and `TODO`/`NOTE`/`FIXME` markers.\n- Snippets for common djot blocks — type a prefix (`frontmatter`, `code`, `code-group`, `note`, `tabs`, `div`, `table`, `link`, `image`, `footnote`, `math`) and press \u003ckbd\u003eTab\u003c/kbd\u003e.\n\n## Install (dev extension)\n\nThe extension is not yet in Zed's official registry. Install it as a dev extension:\n\n1. Clone this repo:\n   ```bash\n   git clone https://github.com/php-collective/zed-djot.git\n   ```\n2. In Zed, open the command palette (`Cmd/Ctrl+Shift+P`) and run **`zed: install dev extension`**.\n3. Select the cloned `zed-djot` folder.\n\nZed will fetch the upstream Tree-sitter grammar from [Codeberg](https://codeberg.org/treeman/tree-sitter-djot) on first install. Subsequent installs use the cached grammar.\n\nTo verify the install, open any `.djot` file — headings, emphasis, and code blocks should be colored.\n\n## Live preview\n\nPair this extension with [`vendor/bin/djot-watch`](https://php-collective.github.io/djot-php/reference/cli#live-preview-djot-watch) from `php-collective/djot` for live HTML preview in your browser.\n\nAfter `composer require php-collective/djot`, add this to your project's `.zed/tasks.json` for one-key preview:\n\n```json\n[\n    {\n        \"label\": \"Djot: Watch current file\",\n        \"command\": \"vendor/bin/djot-watch\",\n        \"args\": [\"$ZED_FILE\"],\n        \"cwd\": \"$ZED_WORKTREE_ROOT\",\n        \"use_new_terminal\": true,\n        \"allow_concurrent_runs\": false\n    }\n]\n```\n\nThen `Ctrl+Shift+P` → **`task: spawn`** → pick the task. A browser tab opens at `http://127.0.0.1:8765/` and live-reloads on every save.\n\n## Roadmap\n\n- Submit to the Zed extension registry once the dev-extension period proves out.\n- Icon-theme contribution for `.djot` files in the file tree.\n- Citation highlighting (`[@key]`, `[@a; @b]`) — pending a `citation` node in the [`php-collective/tree-sitter-djot`](https://github.com/php-collective/tree-sitter-djot) grammar fork.\n\n## Credits\n\n- [Jonas Hietala](https://www.jonashietala.se/) — the upstream `tree-sitter-djot` grammar.\n- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter-queries-djot) — Tree-sitter query starting points.\n- [PHP Collective](https://github.com/php-collective) — `djot-php` parser and `djot-watch` CLI.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-collective%2Fzed-djot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-collective%2Fzed-djot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-collective%2Fzed-djot/lists"}