Fix parsing of complex Caddyfiles#64
Open
nusnewob wants to merge 2 commits intocaddyserver:masterfrom
Open
Conversation
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
573a839 to
f371066
Compare
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
f371066 to
4d34a12
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
?Header-Name:?Cache-Control,?Connection, etcimport_directiverule and allows highlighting