Skip to content

Options and .editorconfig #330

Answered by RobertvanderHulst
cjdutoit asked this question in Q&A
Discussion options

You must be logged in to vote

Christo,
.editorconfig settings are per folder and file type, options are global
if you want to combine these then you need to write some code that gets the defaults from the options page, and then based on a filename you can override the setting.
In our project we do it like this:
https://github.com/X-Sharp/XSharpPublic/blob/main/VisualStudio/LanguageService/Formatting/EditorConfigSettings.cs
The SourceCodeEditorSettings object is initialized with the settings from Tools/Options.
We initialize the settings from the filename passed to ReadSettings() and store the result as object in the ITextBufffer.Properties
collection

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cjdutoit
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants