'Visual Studio Code Deleting Custom Color Themes
I have made my own custom color theme for visual studio code following the directions at https://code.visualstudio.com/api/extension-guides/color-theme#create-a-new-color-theme. In order to use the theme, I copy and paste the theme's folder into the extensions folder of visual studio code. This works fine until anywhere from an hour to a month when visual studio code randomly decides to delete my custom color theme from the extensions folder, and I have to copy it over again.
How do I get visual studio code to stop deleting my custom color theme?
I have tried turning sync settings both on and off, and messing with my sync settings settings in general. Even with it off though my theme will eventually get deleted. I have also messed with internal layout of my theme and its package.json, copying both from guides online and themes already existing in the extensions folder. This does not fix it. I have been considering publishing my color theme to the vs market as a solution, but this seems like a hassle and it would require me to divulge a lot of personal information to microsoft which I do not want to do.
Does anyone else have any ideas what is going on and how to fix it? The nondeterministic nature of this bug has been driving me crazy. I will be eternally grateful to anyone with the solution.
Solution 1:[1]
You can package your extension using vsce in your extension folder:
npm install vsce
vsce package
This will create a .vsix file of your extension. You can then install this file using the code command:
code --install-extension my-extension.vsix
Using this way I have never experienced an issue like you described.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | carlfriedrich |
