angel-luis / vscode-project-colorize

Colorize each project bar with awesome themes in VS Code.
Other
0 stars 0 forks source link

Store in user, not project, based .vscode directory #1

Open nyteshade opened 4 months ago

nyteshade commented 4 months ago

Please allow me to define settings for project-colorize outside of company code repos. Basically store the same values but key them off a project string file path.

So settings might be stored like the following. The problem is that I have to constantly stash and unstash settings before code commits and have had to make changes to PRs repeatedly in large code bases when I forgot to exclude the settings. And before you suggest it, I cannot place the .vscode directory in .gitignore because we have checked in shared .vscode settings for given projects.

{
  "/Users/jane/code/projectA": {
    "workbench.colorCustomizations": {
      "titleBar.activeBackground": "#27374D",
      "titleBar.border": "#27374D",
      "titleBar.activeForeground": "#DDE6ED",
      "titleBar.inactiveBackground": "#475568",
      "titleBar.inactiveForeground": "#e2eaf0"
    }
  },
  "/Users/jane/code/projectB": {
    "workbench.colorCustomizations": {
      "titleBar.activeBackground": "#65451F",
      "titleBar.border": "#65451F",
      "titleBar.activeForeground": "#EAC696",
      "titleBar.inactiveBackground": "#7c6141",
      "titleBar.inactiveForeground": "#edcfa6"
    }
  }
}

And so on...

nyteshade commented 4 months ago

Oh and fix my issue and I will buy you a matcha. :)

angel-luis commented 4 months ago

Hello @nyteshade! I appreciate any request, specially to solve a daily problem.

I've worked very hard this weekend to provide you a solution. The easiest solution could be something like your suggested approach. But after investigate how VSC works (and their API capabilities), unfortunately, the only way to modify a workspace, is modifying the .vscode/settings.json corresponding to the workspace.

So, discarded that idea, I was designing other solutions that I could carry out within my knowledge. And finally I ended up with this solution:

The hardest part has been to provide this feature inside a simple palette command, but I've achieved it! Git Lock

When you have time, please, test it and tell me if it solves your problem! :)

The update will be available in a couple of hours at most.