Run editor config options provider last #1559
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #1558
At the moment we run
.editorconfig
options provider before the formatting options provider (formatting options fromomnisharp.json
+ config params).It doesn't work, because the result is we load formatting settings from
.editorconfig
and then override them all (not just the "changed" ones) with defaults from here. This only applies to formatting rules, not other settings like naming conventions and code style.Now, on our formatting endpoints it doesn't matter, since we reapply
.editorconfig
options on the fly again then - that's why the bug doesn't manifest itself on "normal" formatting, but for external code fixes, the formatting options do not correctly reflect.editorconfig
.The practical consequence is also that if you have an
.editorconfig
file, it will take precedence over anything else but I think this is fine.