Hi, this is kind of early, and might not work. I made this because the "custom CSS" VS Code extension never worked properly for me and it didn't live reload.
This script does a few things:
- Injects the custom css from
custom.css
into your VS Codeworkbench.html
- this is the main HTML file that VS code launches from and putting custom CSS into this file will be applied to anything in the editor. - Starts a websocket server, so that when you change your CSS, it will inject it into the DOM of your VS Code. This gives you live reload of your CSS. No need "Reload window" on every CSS change.
How to use:
- npm install
- Edit server.ts for the location of your workbench.html file
- npm start
- Reload your VS Code once via
Developer: Reload Window
. This will cause the custom JS to connect to the websocket server.
- VS Code doesn't like you messin' with internals. You might get a warning about it being "Corrupt"
- You probably need to re-run this script when VS Code updates.
- To find out which classes to use, you can use
Help
→Toggle Developer tools