Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Can't set pcss as extension #99

Closed
equinusocio opened this issue Nov 28, 2022 · 1 comment · Fixed by #103
Closed

[Bug] Can't set pcss as extension #99

equinusocio opened this issue Nov 28, 2022 · 1 comment · Fixed by #103
Assignees
Labels
bug Something isn't working

Comments

@equinusocio
Copy link

equinusocio commented Nov 28, 2022

Describe the bug
Whle #15 seems to be fixed, I'm not able to assign pcss to the config array, even is is a perfect valid postcss extension suggested for any postcss file since enables vscode completation, stylelint validations and postcss plugin support.

To Reproduce
Steps to reproduce the behavior:

  1. Add this to vscode config
  "cssvar.extensions": [
    "css", "pcss", "jsx", "tsx"
  ],

Expected behavior
No warning about pcss extensions

Screenshots
CleanShot 2022-11-28 at 18 12 00

Additional Info

Some of the accepted values are not extensions at all, like postcss and stylus are not file extensions, they are language IDs and their relative extensions are .pcss and .styl. Language IDs and file extensions are two completely different things in vscode.

Warning
By adding postcss to the list it works for all files using postcss id, indipendently from their extension. It looks like a mispelled setting name since seems to work with languages and not file extensions

Solution

Rename cssvar.extensions into cssvar.languages or make it work with file extensions and not language IDs.

@equinusocio equinusocio added the bug Something isn't working label Nov 28, 2022
@equinusocio equinusocio changed the title [Bug] Can't set .pcss as extension [Bug] Can't set pcss as extension Nov 28, 2022
@phoenisx
Copy link
Contributor

phoenisx commented Dec 1, 2022

Agreed!!

The config name was chosen initially to point only extension names, but the code has changed a lot and for backwards compatibility I never renamed it.

I will take a look into this once I am back.
If you want to work on it please feel free to open a PR.☺️

Thanks for raising this concern 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants