MhMadHamster / vscode-postcss-language

postcss syntax support extension for VSCode
MIT License
34 stars 7 forks source link

No longer supports nesting since 2.0.3 #25

Closed Manc closed 6 years ago

Manc commented 6 years ago

Since extension was updated to 2.0.3 /**/ comments now work as expected, but all nested rules are now being marked as errors. Is it possible this has something to do with the update or did I do anything wrong? Previously I had no problems with nested styles. Thanks!

screenshot-postcss

MhMadHamster commented 6 years ago

sorry, i did not maintain this extension properly for quite a long time so most of deps are outdated now and the extension seems completely broken now. All I can offer now is to download prev version which was kind of working. I'm not using this extension neither postcss now, so i cannot promise to fix it fast. PR appreciated.

spacejack commented 6 years ago

I found an alternative. I'm now using the language-postcss extension for syntax highlighting and to recognize the .pcss file extension.

Additionally I use the stylelint extension for linting/syntax checking. For each project I install stylelint-config-recommended which provides a good set of basic rules. Then to add postcss-nesting support, I use this .stylelintrc file:

{
  "extends": "stylelint-config-recommended",
  "rules": {
    "selector-nested-pattern": "^&"
  }
}

(And of course you can override any other rules you want to change.)

timc13 commented 6 years ago

language-postcss kills css autocomplete which is unfortunate =(

timc13 commented 6 years ago

2.0.2 works fine for me..

I followed the directions here to install the older version https://tpodolak.com/blog/2017/04/09/downgrading-visual-studio-code-extension/

Install from VSIX https://mhmadhamster.gallery.vsassets.io/_apis/public/gallery/publisher/mhmadhamster/extension/postcss-language/2.0.2/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

@MhMadHamster - perhaps you could just re-publish 2.0.2 ?

jeremychone commented 6 years ago

Thanks @timc13. Btw, one more step, before installing from vsix, make sure to disable extension auto update.