-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
"C_Cpp: Formatting default" not working: editorconfig ignored and clang-format forced anyway #12933
Comments
Actually it seems that even by selecting vcFormat as default formatting engine the .editorconfig is ignored. |
@KonssnoK We fixed a bug with .editorconfig formatting with 1.22.11 (and our pending 1.23.1, but the fix is not in 1.23.0) -- are you sure you're on that version? (you may need to reload the extension after it installs the new version). With C_Cpp.loggingLevel set to "Debug" what do you see in the C/C++ logging pane after formatting? Previously, error messages were logged relating to editorconfig. |
this is what i see when i do "format" with default as selected engine
and instead this is what i see when i format with vcFormat
in both cases editorconfig is ignored i guess you refer to #12921 |
@KonssnoK Yes, I don't repro the issue and your logging doesn't show any errors/issues -- can you send a minimal .editorconfig that repros the issue. There might be something particular that is causing an issue or we may not be handling certain values in the .editorconfig. It sounds like their might be an additional bug with vcFormat not used by default if there's an .editorconfig, but it needs to have "cpp_" properties in it. |
sure here is the editorconfig that we use: I know it's not minimal..
PS: the issue exists even if you remove
from the file. |
@KonssnoK Okay, thanks. I repro the bug using that .editorconfig file -- the repro occurs when |
cool, i wait for 1.23.2 then :) |
@KonssnoK We know a fix for your exact repro, but correctly handling all .editorconfig cases is more difficult than we had initially thought so I'm not sure if it'll be ready for 1.23.2, but I would think we'd want it for 1.23.x, since it's a regression from 1.21.6. |
@KonssnoK FYI, it looks like |
oh so spaces are not allowed 🤔 |
well @sean-mcmanus nothing happens even by removing the space. the editorconfig is still ignored. Actually by setting default formatter engine we go back to clang format being used even if i have "file" as setting and an .editorconfig . Not sure why @Colengms closed this :)
|
Hi @KonssnoK . This was closed automatically when the associated PR was completed. You wouldn't see this work properly until a new version is released (1.23.2). We've moved to using exactly the same code to parse section patterns as editorconfig-core-js. Once that is available, the pattern you provided containing a space would not work without removing that space. Opening this for now, so we can close it when the new version is released. |
thanks @Colengms, i will close as soon as i can verify the fix! |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
According to the extension itself,
Steps to reproduce:
Expected behavior:
Result:
Workaround:
Configuration and Logs
None relevant
Other Extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: