-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format changes every save #13
Comments
The formatting functionality is provided by the Formatting works perfectly fine with Working versions:
Broken versions:
|
What's broken about it? |
After some testing caddyserver/caddy@635f075 seems to be the culprit which makes sense after looking at the tests that were added. |
FYI @mholt, we should probably fix that before v2.4.0, shouldn't be difficult. ☝️ |
Want me to open an issue on the caddy repository? I could also work on a PR if wanted. |
A PR would be great ❤️ we're planning to tag v2.4.0 probably today so sooner the better! 😁 |
Oh, the problem is with the env var actually, not the comment... or rather the combination of the two. |
Yeah, that's what I am trying to figure out right now. Without the comment it works fine but with both the environment variable and comment it messes up the rest of the file. |
This is an extremely weird edge-case where if you had a environment variable {} on one line, a comment on the nest line, and the closing of the block on the following line; the rest of the Caddyfile would be indented further than it should've been. ref; caddyserver/vscode-caddyfile#13
This is an extremely weird edge-case where if you had a environment variable {} on one line, a comment on the next line, and the closing of the block on the following line; the rest of the Caddyfile would be indented further than it should've been. ref; caddyserver/vscode-caddyfile#13
* caddyfile(formatter): fix nesting not decrementing This is an extremely weird edge-case where if you had a environment variable {} on one line, a comment on the next line, and the closing of the block on the following line; the rest of the Caddyfile would be indented further than it should've been. ref; caddyserver/vscode-caddyfile#13 * run gofmt * fmt: better way of handling edge case
This should be resolved by caddy |
Releasing now |
System Information
caddy
Version: v2.4.0-beta.2 h1:DUaK4qtL3T0/gAm0fVVkHgcMN04r4zGpfPUZWHRR8QU=Describe the bug
Every time I save/format the indenting flips from what it was before. see this, all I was doing is ctrl+s.
https://streamable.com/ouziak
Steps to Reproduce
Steps to reproduce the behavior:
Expected Behavior
The format stays the same.
Screenshots
See above link.
Additional Context
Caddyfile /w limited section causing it:
The text was updated successfully, but these errors were encountered: