tree-sitter-caddy

Crates.iotree-sitter-caddy
lib.rstree-sitter-caddy
version0.1.0
created_at2026-01-02 03:38:56.479552+00
updated_at2026-01-02 03:38:56.479552+00
descriptionCaddyfile support
homepage
repositoryhttps://github.com/opa-oz/tree-sitter-caddy
max_upload_size
id2017892
size306,397
Vladimir Levin (opa-oz)

documentation

README

tree-sitter-caddy

Functionality

  • Global options
    • Option name
    • Option value
    • Block options
  • Server
    • Protocol, domain, port in any order
    • Multiple addresses
    • No need for {} when only one server
    • Environment variables in address ex. {$DOMAIN:localhost}
  • Tokens and quotes
    • directive "simple string"
    • directive ""simple string""
    • directive ""simple string""
    • directive "quoted string"
    • directive "miltiline string"
    • Heredocs
      example.com {
          respond <<HTML
              <html>
                <head><title>Foo</title></head>
                <body>Foo</body>
              </html>
              HTML 200
      }
      
  • Matchers
    • /path
    • *
    • @post
  • Placeholders
  • Snippets
    • import directive
  • Named Routes
  • Comments
  • Environment variables
  • Types support
    • string
    • quoted strings
    • numerical
    • boolean
    • time (1s, 1m, 1h, 1d)
    • size (1KB, 1MiB)
  • Expressions
    • After-placeholder expressions ({method}.startsWith("P"))
    • Expressions (header({'Connection':'*Upgrade*','Upgrade':'websocket'})
  • Special cases
    • Placeholders can't be found in random string (redir https://www.{host}{uri})
Commit count: 0

cargo fmt