-
Notifications
You must be signed in to change notification settings - Fork 126
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
use tabs for only indentation, not alignment #556
base: main
Are you sure you want to change the base?
Conversation
So applying Like shouldn't last indentation still be tab in this case? EDIT: Version with |
That would probably depend on our settings for indenting stuff like that? |
Looked into it and no, this is considered alignment because it is handled by Personally, I think setting it to |
I think the current change is good enough to warrant a merge atm, it's definitely better than before @GeckoEidechse thoughts? |
Uh, I'll have to give it another. Haven't gotten around still. Too much to do. In general tabs should only be used for indentation cause that's how tab indentation works. Just wanna double check how much stuff goes weird with the change. |
Ok so looking at this again, I found in testing that vscode for example does not support this type of mixed indentation. Not gonna lie, I'm starting to just get frustrated with tab based indentation. Like the whole point about tabs is that you can adjust indentation level to your liking, yet at the same time, you still need spaces for alignment. So merging this will result in people using tabs for alignment cause that's what their IDE inserts and then having CI formatting check fail with no obvious indication cause whitespace changes are invisible by definition...
Honestly, can we just switch everything to spaces and be done with this bs? Like as long as we have tabs, we will either have misaligned alignment for anything but tab size 4 or constant formatting issues in new PRs. There's no way around it. |
Why would you use vscode for launcher stuff wtf |
Except any good IDE will just apply clang format automatically when it detects a clang format file |
No, accessibility is important. The way around it is to not use shit IDEs that dont use clang format |
Cause I'm on Linux and last time I checked visual studio was not supported on Linux :P
Visual Studio exhibits the exact same behaviour as vscode btw. Keep in mind that both pickup So for example in this screenshot, assuming the right line is our cursor hitting the
How is tabs vs spaces and accessibility thing? Is it in regards to smaller screen sizes? |
Iirc clang format isnt applied after each keystroke, because that would be absurd. I have mine set to format a line when i finish the line, as well as on file save. I forget what the default is |
There are other IDEs. Vscode isnt an IDE, its a text editor that people give some IDE features through extensions |
Can be. I've seen people who have problems determining indentation differences on lower widths as well, so they run 6-8 width |
Honestly the real solution here is to make clang format apply on file save. Not sure if you can define that in like .editorconfig or something |
Obviously. My complaint is that IDEs (editors, whatever) don't properly switch between tabs and spaces when pressing the In an all-spaces codebase, the editor properly converts a |
Perhaps we could just not have format check, but instead just make github actions commit a formatted version or something |
@GeckoEidechse Can you update that branch you have and take a look? Hopefully it should be better now |
Because that's the point of using tabs...