willofindie / vscode-cssvar

VSCode extension to support CSS Variables Intellisense
https://marketplace.visualstudio.com/items?itemName=phoenisx.cssvar
MIT License
252 stars 4 forks source link

extension not working at all - how to solve it? #31

Closed lucianahanan closed 2 years ago

lucianahanan commented 2 years ago

I have a simple styled component file, where I tried to see the extension in action. But when typing var(-- , nothing happens from the extension, none of the vars shows in the popup list, no color next to existing vars typed, nada. It was a .ts file.

Also tried on a .css file, with plain css, and it's the same, nothing happens from the extension.

Tried to close VS code, reinstall extension, but still no go. Ideas ?

phoenisx commented 2 years ago

I plan to add examples in the future and remove dependency on the files config.

Can you share your .vscode/settings.json file? It will help me figure out what config you have used wrong.

lucianahanan commented 2 years ago

I couldn't find a way to export vscode settings. But it's configured like default instalation of it. If you have any discord server, I can share my screen on realtime.

phoenisx commented 2 years ago

I have added a very basic example with pure CSS setup here: https://github.com/willofindie/vscode-cssvar/tree/master/examples/basics

Please validate your configs from the mentioned example's .vscode/settings.json.

Do make sure:

Details for the above config are mentioned in this Projects README.md file.

lucianahanan commented 2 years ago

Wait, the extension will not work out of the box?

Then can I add these json settings and make them get called fromr every old and new project opened by vscode, without having to add a setting file for each one? If so, where can I save these settings in windows folders and how does the setting files should look like to accept all css types extensions possible?

WebMechanic commented 2 years ago

can I add these json settings and make them get called fromr every old and new project opened by vscode ...

@lucianahanan if you click "Extension Settings" from the extension page and make changes in the graphical editor, Code will by default automatically update your user settings.json with the changes you make here. Some items get you directly to the current settings.json file itself, like editing "Cssvar: Files" by clicking on the link "Edit in settings.json". Here you can manually add and modify settings as explained in the README.md file.

if you click the little "Workspace" tab at the top of the settings editor, Code will add these changes to your workspace file (.code-workspace) so you can change them on a per-project basis. image

In Code you can also choose to edit the settings.json directly by

  1. pressing F1
  2. type preferences json into the command propmt
  3. pick either "Preferences: Open Settings (JSON)" or "Preferences: Open Workspace Settings (JSON)" whichever you want to mess with ;-) image

This step is independent of any extension, but values and contents in these files may vary significantly depending on your Workspace.

where can I save these settings in windows folders ... ?

Please make yourself familiar of how Code handles program and extension settings and how to switch between the GUI editor and the .json format as well as the three scopes. user, workspace, folder, where individual settings can be stored. It's an integral part of the VSCode ecosystem and you should understand how to find and edit settings.

Happy coding.