{"id":51471664,"url":"https://github.com/synadia-labs/treesitter-nats-server","last_synced_at":"2026-07-06T18:30:34.081Z","repository":{"id":344215694,"uuid":"1180415796","full_name":"synadia-labs/treesitter-nats-server","owner":"synadia-labs","description":"treesitter parser for nats-io/nats-server config files","archived":false,"fork":false,"pushed_at":"2026-03-20T17:21:40.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-21T08:42:05.868Z","etag":null,"topics":["ai-generated-code","nats","nats-server","natsio","treesitter"],"latest_commit_sha":null,"homepage":"","language":"C","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/synadia-labs.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-13T02:43:02.000Z","updated_at":"2026-03-19T07:17:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/synadia-labs/treesitter-nats-server","commit_stats":null,"previous_names":["synadia-labs/treesitter-nats-server"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/synadia-labs/treesitter-nats-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synadia-labs%2Ftreesitter-nats-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synadia-labs%2Ftreesitter-nats-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synadia-labs%2Ftreesitter-nats-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synadia-labs%2Ftreesitter-nats-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synadia-labs","download_url":"https://codeload.github.com/synadia-labs/treesitter-nats-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synadia-labs%2Ftreesitter-nats-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35202785,"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-07-06T02:00:07.184Z","response_time":106,"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":["ai-generated-code","nats","nats-server","natsio","treesitter"],"created_at":"2026-07-06T18:30:33.217Z","updated_at":"2026-07-06T18:30:34.048Z","avatar_url":"https://github.com/synadia-labs.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tree-sitter-nats-server-conf\n\nA [tree-sitter](https://tree-sitter.github.io/) grammar for [NATS server](https://nats.io/) configuration files.\n\nProvides syntax highlighting, code folding, indentation, and structural navigation for `.conf` files used by `nats-server`.\n\n## Features\n\nThe grammar handles the full NATS server configuration format:\n\n- **Comments**: `#` and `//` line comments\n- **Key-value pairs**: with `=` or `:` separators\n- **Blocks**: `cluster { }`, `jetstream { }`, `tls { }`, etc.\n- **Nested blocks**: arbitrary nesting depth\n- **Arrays**: `[value1, value2]` with commas or newlines\n- **Strings**: quoted `\"...\"` with escape sequences, and unquoted bare strings (URLs, paths, IP addresses)\n- **Numbers**: integers, floats, with size suffixes (`KB`, `MB`, `GB`, `TB`) and duration suffixes (`ns`, `us`, `ms`, `s`, `m`, `h`, `d`)\n- **Booleans**: `true`/`false`, `yes`/`no`, `on`/`off` (case insensitive)\n- **Variables**: `$VARNAME` references\n- **Include directives**: `include ./path/to/file.conf`\n\n## Quick Start\n\n```bash\n# Install dependencies\nnpm install\n# This is more reliable than the npm approach, so we've split it out.\n# Assumes that you have rust/cargo installed and ~/.cargo/bin in $PATH already.\ncommand -v tree-sitter || cargo install tree-sitter-cli\n\n# Generate the parser\ntree-sitter generate\n\n# Run tests\ntree-sitter test\n\n# Parse a file\ntree-sitter parse examples/basic.conf\n```\n\n## Building\n\n```bash\n# Build the shared library\nmake\n\n# Install system-wide\nsudo make install\n```\n\n## Editor Integration\n\n- [Neovim](docs/editors/neovim.md) — nvim-treesitter setup with highlighting, folding, and indentation\n- [Helix](docs/editors/helix.md) — languages.toml configuration and query installation\n- [VS Code](docs/editors/vscode.md) — Extension setup with TextMate grammar fallback\n- [Emacs](docs/editors/emacs.md) — Built-in treesit (29+) and emacs-tree-sitter setup\n- [Zed](docs/editors/zed.md) — Extension with tree-sitter grammar and query files\n- [Nova](docs/editors/nova.md) — Panic Nova extension with syntax definition\n\n## Grammar Structure\n\n```\nsource_file\n├── comment              # or // line comments\n├── include_directive    include \u003cpath\u003e\n├── pair                 key = value  or  key: value\n│   ├── key              identifier\n│   └── value\n│       ├── string       \"quoted\" or bare/unquoted\n│       ├── number       42, 3.14, 1GB, 30s\n│       ├── boolean      true/false/yes/no/on/off\n│       ├── variable_reference  $VARNAME\n│       └── array        [...]\n└── block_definition     name { ... }\n    └── block            { statements... }\n```\n\n## Language Bindings\n\nBindings are available for:\n\n- **C** — `bindings/c/`\n- **Go** — `bindings/go/` + `go.mod`\n- **Node.js** — `bindings/node/`\n- **Python** — `bindings/python/` + `pyproject.toml`\n- **Rust** — `bindings/rust/` + `Cargo.toml`\n- **Swift** — `bindings/swift/` + `Package.swift`\n\n## Examples\n\nSee the [`examples/`](examples/) directory for sample configuration files:\n\n- `basic.conf` — Simple server setup\n- `cluster.conf` — Cluster with routes and TLS\n- `jetstream.conf` — JetStream with accounts\n- `full.conf` — Comprehensive configuration\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynadia-labs%2Ftreesitter-nats-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynadia-labs%2Ftreesitter-nats-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynadia-labs%2Ftreesitter-nats-server/lists"}