5

In VS Code there is this concept of a workspace that can contain folders, settings, recommended (and ignored) extensions, launch configurations and tasks. Semantically a workspace is hierarchically above the folder/repo concept, i.e. a workspace contains (zero or more) folders. This being the case, it makes sense for a .code-workspace file to be outside it's root folders/repositories.

Folder structure example:

/Repos/
    /repository1/           <= Source controlled
    /repository2/           <= Source controlled
    repos.code-workspace    <= Not source controlled

This begs the question: how do you keep .code-workspace files source controlled and how do you share them with your team?

André Casal
  • 1,012
  • 1
  • 11
  • 25
  • https://github.com/microsoft/vscode-docs/issues/3264 – Thorsten Schöning Mar 31 '22 at 11:11
  • Am new to VS Code and have the same question. Need workspace folder files within the GIT-repo to e.g. document file encodings, as VS Code doesn't fully support `.editorconfig` yet. https://github.com/editorconfig/editorconfig-vscode/issues/35 – Thorsten Schöning Mar 31 '22 at 11:17
  • I found the following answer pretty helpful explaining a bit about folder settings vs. workspace settings and when the former is supported over the latter etc. https://stackoverflow.com/a/69393961/2055163 Seems like I'm trying to not use workspace files at all and prefer folder settings where possible, am going to put those into GIT like with man other .-files etc. – Thorsten Schöning Mar 31 '22 at 16:01

0 Answers0