Comments (5)
Update: I've done some tests and I realized that we have access to window.nodeRequire
which gives us access to the FileSystem thanks to nodeRequire('fs')
.
So I updated the script and it now finds the right extension directory whatever the version number is.
No more need for tags names or internet access! It should load the synthwave84.css
file from the extension directory after each update without having to change the path.
It also gets the user home directory with nodeRequire('os').homedir()
and no more config is required except the declaration in settings.json
like:
"vscode_custom_css.imports": [
"file:///Users/username/.vscode/loadResourcesFromExtensionsDirectory.js"
],
Let me know what you think of it ๐
from synthwave-vscode.
I originally wanted to do it this way. The issue I see though, is that the file-path to the extension changes every time it updates a version number. This means that any update to the extension will break the glow, regardless of whether or not the CSS file has changed.
Currently, copying it means that unless the glow CSS has been updated, it will persist as it was prior to the update.
There are definitely pros and cons to both methods.
I'd be interested to get more feedback as to which was preferred.
from synthwave-vscode.
Nice! very cool work. I'll look to incorporate it in the next version.
from synthwave-vscode.
I also prefer @ranolfi's method because the css will remain up to date with the next updates of the extension.
Regarding the version number issue, I have made this little script which is load instead of the css file in vscode_custom_css.imports
. It fetches the tag names from the repo and then look for a matching directory/file with the file:///
protocol, allowing to not worry about future updates.
This is probably not the best solution, plus it will not work without internet connection (I can probably add a fallback for this), but It should work with any extension.
from synthwave-vscode.
@hadriengerard works great!
I think the right place for this script is the Readme.md
file.
from synthwave-vscode.
Related Issues (20)
- Can't get glowing to work on VSCodium HOT 1
- Glow not working after enabling Neon Dreams multiple times
- Feature Request: Tron Theme
- How do I run the extension in admin privileges on a github codespace?
- not able to customize "editorGutter.background" colour
- M1 Mac Studio: "Something went wrong when starting neon dreams" HOT 1
- Ubuntu 22.04.2 LTS - Something went wrong error on activating neon dreams HOT 4
- Text highlight not working HOT 1
- ERROR: You may need to run VS code with admin privileges in order to enable Neon Dreams. HOT 1
- How to use Synthwave84 (with or without a glow) for a static HTML page?
- Diff files have no syntax highlight HOT 1
- Enable glow for other languages HOT 1
- Upward text and italic text have a different font
- Editor Background Different Color Than Gutter, Not Getting Glow Effect
- update distro ยท microsoft/vscode@2e4712e
- APC UI breaks synthwave HOT 1
- Jupyter notebook cell highlighting only works on mouse hover, not using keyboard HOT 1
- I can't disable neon dreams glow effect.
- Change to Go code colors after vscode upgrade HOT 3
- unable to start Neon Dreams HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synthwave-vscode.