Skip to content

chore: update tree-sitter; remove dead rust code#5

Closed
notpeter wants to merge 3 commits intonusnewob:mainfrom
notpeter:ts_update
Closed

chore: update tree-sitter; remove dead rust code#5
notpeter wants to merge 3 commits intonusnewob:mainfrom
notpeter:ts_update

Conversation

@notpeter
Copy link
Copy Markdown

@notpeter notpeter commented Jan 13, 2026

- Removed the rust code as it was currently a no-op.
- Update adds HEREDOC support and other fixes too.
- tree-sitter diff:
  caddyserver/tree-sitter-caddyfile@a599a9c...462aa78
Comment thread extension.toml Outdated
[grammars.caddyfile]
repository = "https://github.com/caddyserver/tree-sitter-caddyfile.git"
commit = "a599a9ca6729d4a115f59a7f12247e86e9a78008"
commit = "8951716aa2855e02dada302c540a90f277546095"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on my testing, new commits after this breaks syntax highlighting.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. I've rolled back to caddyserver/tree-sitter-caddyfile@462aa78

which works for me, but still breaks if snippets and sites are intermingled as I described here caddyserver/tree-sitter-caddyfile#52 but an improvement over the current state.

This reverts commit 4d8c7ee.
@nusnewob
Copy link
Copy Markdown
Owner

nusnewob commented Mar 8, 2026

It still fails to recognise snippets and sites mixed config based on my test using https://github.com/nusnewob/caddyfile-zed/blob/main/test/Caddyfile

@notpeter
Copy link
Copy Markdown
Author

notpeter commented Mar 8, 2026

Yep. Upstream opted to not merge caddyserver/tree-sitter-caddyfile#52 and claimed it was fixed in caddyserver/tree-sitter-caddyfile@8951716.

I'm going to ahead and close. Still probably worth removing Cargo.lock,Cargo.toml,src/lib.rs -- they are a no-op and not required for language extensions that only provide tree-sitter languages but no LSP.

@notpeter notpeter closed this Mar 8, 2026
@nusnewob
Copy link
Copy Markdown
Owner

nusnewob commented Mar 8, 2026

@notpeter
caddyserver/tree-sitter-caddyfile#64
zed-industries/extensions#5152

I forked the upstream and appllied it with my own fix, let's see if they'll merge it.

I know the rust code doesn't do anything, it was kept in there just for placeholder, if someone creates a caddy LSP

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.

2 participants