Skip to content

Conversation

@blaqshyd
Copy link
Contributor

Disables auto-closing for angle brackets < and >.

This prevents the behavior where typing a < b results in a <b>. This matches the behavior in other C-style language extensions (e.g., Java).

Closes #51

@cla-bot cla-bot bot added the cla-signed label Dec 15, 2025
@MrSubidubi MrSubidubi changed the title fix: Disable angle bracket auto-closing Disable angle bracket auto-closing Dec 15, 2025
@MrSubidubi
Copy link
Contributor

Thanks for this!

Can we instead not just go for close=false, newline=false? That would actually match what Java does as per https://github.com/zed-extensions/java/blob/main/languages/java/config.toml#L10

@blaqshyd
Copy link
Contributor Author

blaqshyd commented Dec 16, 2025

Sure, we can go the same route as the Java extension fix but the rationale behind my proposed fix are:

The suggested/proposed rule (close: false, newline: false) is a redundant no-operation (no-op).

Generics in Dart are always inline (List<int>), so auto-closing or newlining provides no benefit. Removing the rule simplifies the configuration without affecting user experience.

But I can add it back and just set both to false. Do let me know if you want me to proceed with that @MrSubidubi

@MrSubidubi
Copy link
Contributor

We use the bracket config in some other places aside from autoclosing aswell, so I think it would be better to keep these around

@blaqshyd blaqshyd force-pushed the fix/disable-angle-bracket-autoclose branch from f55aad0 to 60496d9 Compare December 16, 2025 15:16
@blaqshyd blaqshyd force-pushed the fix/disable-angle-bracket-autoclose branch from 60496d9 to 5f1311a Compare December 17, 2025 11:24
@blaqshyd
Copy link
Contributor Author

I had to do some rebasing so that there's a linear commit. Thanks

Copy link
Contributor

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

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

We squash anyway, so might not have been needed.

However, the fix looks good, thank you!

@MrSubidubi MrSubidubi merged commit b25bb63 into zed-extensions:main Dec 21, 2025
5 checks passed
@blaqshyd
Copy link
Contributor Author

Noted for next time. Thank you

@blaqshyd blaqshyd deleted the fix/disable-angle-bracket-autoclose branch December 22, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't autoclose angle brackets

2 participants