Skip to content

Fix parsing of complex Caddyfiles#64

Open
nusnewob wants to merge 2 commits intocaddyserver:masterfrom
nusnewob:fix/complex-caddyfile-parsing
Open

Fix parsing of complex Caddyfiles#64
nusnewob wants to merge 2 commits intocaddyserver:masterfrom
nusnewob:fix/complex-caddyfile-parsing

Conversation

@nusnewob
Copy link
Copy Markdown

@nusnewob nusnewob commented Mar 8, 2026

nusnewob added a commit to nusnewob/caddyfile-zed that referenced this pull request Mar 8, 2026
- Fix parsing nested blocks in global options and handle lines in blocks that start with string literals (e.g. https://github.com/greenpau/caddy-security/blob/main/assets/config/Caddyfile#L63-L64)
- Fix parsing `?Header-Name`: `?Cache-Control`, `?Connection`, etc
- Add top-level `import_directive` rule and allows highlighting

TODO: using forked `tree-sitter-caddyfile`, revert to upstream once caddyserver/tree-sitter-caddyfile#64 is approved and merged
@nusnewob nusnewob force-pushed the fix/complex-caddyfile-parsing branch from 573a839 to f371066 Compare March 8, 2026 15:32
nusnewob added a commit to nusnewob/caddyfile-zed that referenced this pull request Mar 8, 2026
- Fix parsing nested blocks in global options and handle lines in blocks that start with string literals (e.g. https://github.com/greenpau/caddy-security/blob/main/assets/config/Caddyfile#L63-L64)
- Fix parsing `?Header-Name`: `?Cache-Control`, `?Connection`, etc
- Add top-level `import_directive` rule and allows highlighting

TODO: using forked `tree-sitter-caddyfile`, revert to upstream once caddyserver/tree-sitter-caddyfile#64 is approved and merged
- Fix parsing nested blocks in global options and handle lines in blocks that start with string literals (e.g. https://github.com/greenpau/caddy-security/blob/main/assets/config/Caddyfile#L63-L64)
- Fix parsing `?Header-Name`: `?Cache-Control`, `?Connection`, etc
- Add top-level `import_directive` rule and allows highlighting
@nusnewob nusnewob force-pushed the fix/complex-caddyfile-parsing branch from f371066 to 4d34a12 Compare March 8, 2026 15:37
nusnewob added a commit to nusnewob/caddyfile-zed that referenced this pull request Mar 8, 2026
- Fix parsing nested blocks in global options and handle lines in blocks that start with string literals (e.g. https://github.com/greenpau/caddy-security/blob/main/assets/config/Caddyfile#L63-L64)
- Fix parsing `?Header-Name`: `?Cache-Control`, `?Connection`, etc
- Add top-level `import_directive` rule and allows highlighting

TODO: using forked `tree-sitter-caddyfile`, revert to upstream once caddyserver/tree-sitter-caddyfile#64 is approved and merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant