3

Me and my team are working in a large repo, with dozens and dozens of different projects within. We have settings for writing documentation within VSCode that we'd like to apply to all workspace subfolders, so that if you open a subfolder where the project you're actually working on is, you'll get the same experience as if you opened VSCode at the root workspace level

.vscode
|-- settings.json   <-- Workspace settings I'd like to apply globally
private
|-- src
    |-- proj1       <-- If VSCode is opened in this folder, global settings are applied
        |-- ...
    |-- proj2       <-- Same here...
        |-- ...
    |-- proj3       <-- And here...
        |-- ...
    |-- proj4       <-- etc.
        |-- ...
    |-- proj5
        |-- ...
    |-- tools
        |-- proj6   <-- And in sub-sub folders
            |-- ...
        |-- ...
    |-- ...

I'm aware of Multi-Root workspaces, but my understanding is that would require adding every project to the workspace in order for the settings to apply, which would mean sifting through maybe a hundred folders to find the one you care about, and still wouldn't allow you to open VSCode in the subfolder where your project is.

Is there a way to do this with VSCode?

  • Hi, given what you are trying to achieve, why don't you define settings at the user level, instead of workspace or folders, since user settings apply globally to all VS Code instances?https://code.visualstudio.com/docs/getstarted/settings#_settings-precedence – Laurent Nov 11 '21 at 07:40
  • 3
    @Laurent Because I want to apply these settings to VSCode instances of all developers on our team who are using VSCode in our codebase. If I were to use user settings, I imagine I'd either have to ask devs to apply these user settings on their own (which no one wants to do), or have them run some sort of script to automatically write to their user settings file, which would probably also require some JSON parsing/writing to make sure I don't overwrite their current user settings – Walter Svenddal Nov 11 '21 at 16:38
  • Did you ever find a solution to this? – Bram Vanbilsen Jun 12 '23 at 08:54

0 Answers0