-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
VS2019 doesn’t want to respect my solution’s .editorconfig’s C# tab settings when it auto formats code #47396
Comments
Here is another example of VS2019 not only ignoring my .editorconfig, on top of it also formating using \n, when the entire file is \r\n (as can be seen at the bottom, from the document I have open behind this window). If I were to apply this "fix formatting"* then I'd have MIXED line endings, which I would only get a warning and fix prompt the NEXT time I opened the document
|
@kornman00 can you provide us with a way to reproduce this? Thanks! |
@kornman00 This is a different issue. See #47382 and related. |
@CyrusNajmabadi Thanks, I can work on trying to setup a minimal project to repro later this week. However, I think I have narrowed down the issue. Initially, I created a solution level .editorconfig file which was "initially inferred by Visual Studio IntelliCode" (and also configured it to
What do I mean by "solution level"? The sln itself references it ("Solution Items"), and it lives at the root level next to the .sln file. The two projects in the sln are in subfolders. However, after adding a catch all to the top of the file to always use tabs everywhere, Code Style stopped using spaces
So, it would seem that maybe the editorconfig settings that Code Style is pulling from is not narrowed to the file extension of the file being edited? Hope this helps in the meantime |
...however, it would appear whatever formats expanding public void Foo()
{
} The lines with the bracket have spaces. the declaration line retains the tabs, while the cursor is placed within the body and virtually indented with tabs. |
@kornman00 if you can provide a repro snapshot somewhere (i.e. a git repo), along with repro steps, that would be helpful. |
Closing this issue as we've seen no reply to the request for more information. If you are able to get the requested information, please add it to the issue and we will retriage it. |
Direct customer ask copying here:
The text was updated successfully, but these errors were encountered: