editorconfig-visualstudio
editorconfig-visualstudio copied to clipboard
Future of this project with regards to VS 2017
I was just going over the release notes of VS 2017 and noticed this:
New in RC Visual Studio editor now supports EditorConfig, which allows developers to define and maintain consistent coding style conventions between different editors and IDEs. See known issues for a list of known limitations in EditorConfig support in this RC release.
I suppose that this extension will be deprecated then in favour of the built-in support? Either way, thanks for all the work so far, since it probably encouraged Microsoft to add built-in support :)
Unless someone wants to and sees a reason. I personally have no plans to bring this extension over to 2017.
I do hope the limitations will be fixed soon (maybe first update).
EditorConfig is not supported in XML files Issue: Coding style conventions defined in .editorconfig are not applied when editing XML files. Workaround: There is no workaround at this time.
and
EditorConfig insert_final_newline and trim_trailing_whitespace properties are not supported yet Issue: insert_final_newline and trim_trailing_whitespace properties defined in .editorconfig file have no effect. Workaround: There is no workaround at this time.
From what i gathered many more source formatting options will be expressible as editor config extension properties so i'm super hopeful this will receive continued love from Microsoft! :heart:
If someone feels these are important enough limitations to warrant a release for 2017 please let me or other members of the organization know, we happily accept PR's and add to the contributor list for the repos if needed!
I think it is great the VS2017 has builtin EditorConfig support.
The release notes are about the RC. Those limitations you mention may even be fixed in the RTM.
Yup some of the editorconfig extension properties that are going into roslyn just got pulled in a vs2017-rc2 branch: https://github.com/dotnet/roslyn/pull/15029
Good times ahead!
FWIW i added a note on VS2017 and Resharper to the readme https://github.com/editorconfig/editorconfig-visualstudio
I'm not sure if I am correct, but isn't the support in VS2017RC only for C#? I would like to use EditorConfig in C++.
Although I haven't tested the RC, I assume it is a Visual Studio feature, not a language specific one. So it should work for all languages that VS supports.
Ah sorry. It works with C++, the problem was, that it doesn't support solution wide .editorconfig. I have to put it inside of every project.
As said, haven't seen it in action yet but I assume when you put the .editorconfig file in the right place (the root directory of your solution) it will work as expected. Don't see why they would implement it differently.
Do you have any reference that a solution wide .editorconfig file doesn't work? Did you see this behavior yourself? Is the "root = true" set in the right place?
So I tried it myself first. Putting .editorconfig file into the solution folder does nothing, while putting it into the project folder results in correct indentation setting. The file is just simple:
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.{cpp,hpp}]
indent_style = space
indent_size = 4
There's also this topic in the support page, but it's closed as not a bug.
thanks for reporting @spades789 👍
I've pinged the folks over at MS (over email) that I know worked on the EditorConfig integration to continue the conversation.
It would be a real shame if the native editorconfig does not resolve files according to the spec.
@spades789 MS let me know that it should work and now that I have VS2017 installed myself I can confirm it works as expected on my end.
Also checkout: https://github.com/madskristensen/EditorConfigLanguage for additional editorconfig integrations (the inheritance visualizer could maybe help debug your problem).