Open motherboardMage opened 3 months ago
I can reproduce this issue. It looks like our tree-sitter indents.scm
is pretty bare-bones for C:
Perhaps we can incorporate nvim-treesitter/queries/c/indents.scm from neovim (Apache 2.0 License). Theirs correctly leaves the braces unindented.
Hey, thank you, while I didn't understand most of what you said (because I'm quite new to computer science) but I'm glad I could help making Zed a little better. I have encountered another problem, perhaps in the same vein and I am yet to create an issue about it. Please look into it when I do. Thanks again
Still having this issue as well on arch build of zed Has this been resolved?
Check for existing issues
Describe the bug / provide steps to reproduce it
The issue:
Whenever I try to type in curly braces under an if statement in C, the Zed editor automatically adds an indent before them. I have turned code formatting off.
Steps to reproduce:
Screen recording of the issue and a screenshot of my config file are attached with this bug report
https://github.com/zed-industries/zed/assets/145113/4156d580-9f53-4d30-9455-0209f093a72f
Environment
Zed: v0.142.6 (Zed) OS: macOS 14.5.0 Memory: 8 GiB Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.N/A