title: EditorConfig: applying rules to multiple, specific folders
body: <p>Let's say I have a project with the following folders:</p>
  
  <pre><code>/
    /folder1
    /folder2
    /folder3
    /folder4
    /folder5
  </code></pre>
  
  <h2>Question</h2>
  
  <p>Is there a way to have my <code>.editorconfig</code> file at root (<code>/</code>) level but only apply the same rules to (all files within) <code>folder1</code>, <code>folder3</code> and <code>folder5</code> but not the other two?</p>
  
  <h2>What I could do (but doesn't seem ideal)</h2>
  
  <ul>
  <li>Have one copy of the <code>.editorconfig</code> file within <code>folder1</code>, <code>folder3</code> and <code>folder5</code>. But duplicating it seems very ugly/inconvenient.</li>
  <li>Create an <code>.editorconfig</code> within the root folder with all the rules, then another one with just <code>root = true</code> within all the "excluded" folders (<code>folder2</code> and <code>folder4</code>). It's better, but not ideal because we have to remember to do it on every single folder rules should not be applied to (in reality, there may be dozens of them).</li>
  </ul>
  
  <h2>What I would like to (be able to) do</h2>
  
  <p>Create an <code>.editorconfig</code> at root level, and list the folders rules should be applied to. I didn't find a way to do something like this:</p>
  
  <pre><code>[/folder1/**]
  [/folder3/**]
  [/folder5/**]
  end_of_line = lf
  insert_final_newline = true
  </code></pre>
  
  <p>Invalid because you cannot combine sections like that.</p>
  
  <p>Or, using the <code>{s1,s2,s3}</code> format:</p>
  
  <pre><code>[{/folder1/**, /folder3/**, /folder5/**}]
  end_of_line = lf
  insert_final_newline = true
  </code></pre>
  
  <p>But it doesn't seem to be valid either (only simple file name patterns seem allowed).</p>
  
  <p>Is there any other way to achieve this? I didn't find anything on the docs or elsewhere, but I may have missed something obvious.</p>