← Documentation

Editor Support

Zing's IDE support follows the LSP (Language Server Protocol) hub architecture — the industry-standard shape: semantic capabilities (diagnostics/completion/hover/definition/symbols/folding/semantic tokens) are served by a single backend, zing-language-server, consumed natively by VSCode / JetBrains / Neovim / Zed — one implementation, every editor, zero drift.

zing-language-server = the single semantic backend
  ├─ VSCode    zing-vscode extension (vscode-languageclient)
  ├─ JetBrains zing-jetbrains plugin (IntelliJ 2023.2+ built-in LSP API)
  ├─ Neovim    nvim-lspconfig, three lines
  ├─ Zed       zing-zed extension (tree-sitter fallback + LSP config)
  └─ (per-platform highlight fallbacks: TextMate / tree-sitter / vim syntax)

Semantic backend: zing-language-server

A PHP stdIO JSON-RPC 2.0 server (zero Composer dependencies, PHP 5.6+).

LSP capability Notes
Diagnostics (push) Engine validateDetailed() — structured code/line/suggestion
Completion directives (incl. closing) / filters / is-tests, trigger chars { | space / -
Hover Markdown docs for directives/filters/is-tests (bilingual)
Definition include/extends/template → tplDir-relative resolution (auto .htm)
Document symbols block-directive hierarchy
Folding block ranges + literal regions
semanticTokens delimiter-aware semantic highlighting (shared implementation of the engine v1.14.0 configurable-delimiters feature)

Delimiters flow through initializationOptions.zing.delimiters (aligned with the engine's constant-guard semantics).

Editor integration

VSCode (zing-vscode)

All semantics via LSP; the extension additionally ships render preview (spawns the real PHP engine into a Webview), snippets and TextMate highlighting. Configuration: zing.phpPath / zing.enginePath / zing.tplDir / zing.delimiters.* / zing.serverPath (the server is bundled, external override allowed).

Neovim (nvim-lspconfig)

vim.lsp.start({
  name = "zing",
  cmd = { "/path/to/zing-language-server/bin/zing-lsp" },
  filetypes = { "zing", "html" },
})

JetBrains (zing-jetbrains)

IntelliJ IDEA / PhpStorm etc. 2023.2+ built-in LSP API — the plugin registers zing-lsp with a TextMate bundle for out-of-the-box highlighting; a settings page configures php/server paths and delimiters.

Zed (zing-zed)

tree-sitter syntax-tree highlighting fallback (Zed platform requirement: no grammar, no highlighting) + [language_servers.zing-lsp] consuming the backend.

Repositories

Repository Role
zing-language-server Semantic backend (LSP server)
zing-vscode VSCode extension (LSP client + preview)
zing-jetbrains JetBrains plugin (LSP bridge + TextMate)
zing-zed Zed extension (tree-sitter + LSP config)
zing-vim Vim 8 legacy highlight fallback (Neovim uses LSP)