Closed hugomrdias closed 9 years ago
Not a fix, but a workaround
cmd + shift + p and open and run Browse Packages. Navigate to your syntax highlighting package (sass/scss) and look for a .tmLanguage
file. Mine was: Sass/Syntaxes/Sass.tmLanguage
.
If you take a peek at https://github.com/csscomb/sublime-csscomb/blob/master/CSScomb.py#L115-L116 you'll see that scss detects for filenames of SCSS.tmLanguage which did not work in my case. You can either rename your syntax file or edit your local copy of CSScomb.py and it should work.
Mine wasn't working either, but is now.
Make sure your .scss is being read in the correct syntax by Sublime. https://sublime.wbond.net/packages/SCSS may help with this.
I replaced the contents of %AppData%\Roaming\Sublime Text 3\Packages\CSScomb JS\node_modules\csscomb with the source for csscomb.js 3.0.0-5. https://github.com/csscomb/csscomb.js/tree/dev
The Sublime package is using csscomb v2.0.4, .scss fixes are in v3+.
Yeah, I was using SASS Syntax instead of SCSS. Wasn't working either.
Same here for LESS files. Sublime has no LESS syntax, and I use CSS syntax for .less files.
CSSComb throws an error when trying to proceed some less code.
@Diokuz have you tried installing the LESS syntax plugin before running CSSComb?
I don't use LESS, but installing the plugin and changing the syntax for .less files from Plain Text to LESS after plugin installation allowed CSSComb to run for me. This is using updated csscomb.js source (3.0.0-5) instead of the source included in the Sublime CSSComb package.
This solution fix my problem.
# Check is installed nodejs or not
$ node -v
v7.1.0
$ which node
/usr/local/bin/node
# Change the node-path in sublime csscomb setting
{
"node-path" : ":/usr/local/bin"
}
Install sass/scss package in sublime
Set current file syntax to scss type in sublime Sublime Toolbar->view->syntax->scss
Press ctrl+shift +c to run "CSScomb"
Is this by design ?