editorconfig-vscode icon indicating copy to clipboard operation
editorconfig-vscode copied to clipboard

Feature request: Allow for .editorconfig file to be placed in a config folder but configure parent root

Open mainframenzo opened this issue 2 years ago • 1 comments

I am woefully trying to move all of my configuration files to a folder in my source code called config. I would also like to place the .editorconfig file in this folder. I would then probably need to configure the plugin by saying that the .editorconfig file in ./config is actually in charge of configuring all files in ./, possibly by modifying it to have root = ../.

I do not think this is possible today? Please consider something like it as a feature request? Thank you!

mainframenzo avatar Nov 29 '22 21:11 mainframenzo

I don't think it will be supported because this is part of the spec:

Where are these files stored?

When opening a file, EditorConfig plugins look for a file named .editorconfig in the directory of the opened file and in every parent directory. A search for .editorconfig files will stop if the root filepath is reached or an EditorConfig file with root=true is found.

EditorConfig files are read top to bottom and the most recent rules found take precedence. Properties from matching EditorConfig sections are applied in the order they were read, so properties in closer files take precedence.

dserodio avatar Apr 25 '23 14:04 dserodio