Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jameswilson/2667412 to your computer and use it in GitHub Desktop.
Save jameswilson/2667412 to your computer and use it in GitHub Desktop.
Patch for SASS, LESS, Compass QuickLook Syntax Highlighting with QLColorCode.qlgenerator
diff --git a/Contents/Info.plist b/Contents/Info.plist
index 30088e8..1fba4c8 100644
--- a/Contents/Info.plist
+++ b/Contents/Info.plist
@@ -284,6 +284,9 @@
<key>public.filename-extension</key>
<array>
<string>css</string>
+ <string>less</string>
+ <string>scss</string>
+ <string>sass</string>
</array>
</dict>
</dict>
diff --git a/Contents/Resources/etc/highlight/filetypes.conf b/Contents/Resources/etc/highlight/filetypes.conf
index 3288caa..4add7c5 100644
--- a/Contents/Resources/etc/highlight/filetypes.conf
+++ b/Contents/Resources/etc/highlight/filetypes.conf
@@ -22,6 +22,7 @@ $ext(bat)=cmd
$ext(c)=c++ cpp cxx cc h hh hxx hpp
$ext(cfc)=cfm
$ext(cob)=cbl
+$ext(css)=less sass scss
$ext(diff)=patch
$ext(e)=se
$ext(erl)=hrl
diff --git a/Contents/Resources/override/config/filetypes.conf b/Contents/Resources/override/config/filetypes.conf
index 57f784f..62421a4 100644
--- a/Contents/Resources/override/config/filetypes.conf
+++ b/Contents/Resources/override/config/filetypes.conf
@@ -14,6 +14,7 @@
# Modified by Nathan Gray <[email protected]>
$ext(c)=c++ cpp CPP C cxx cc h hh hxx hpp H HPP pch cp pch++
+$ext(css)=less sass scss
$ext(php)=php3 php4
$ext(vb)=bas basic bi vbs
$ext(pl)=perl cgi pm plx plex
@jameswilson
Copy link
Author

Instructions:

$ cd ~/Library/QuickLook/QLColorCode.qlgenerator
$ wget https://gist.github.com/raw/2667412/36e4a316b7827643a99c159a057c05a64fb85ccf/QLColorCode-sass-less-compass.patch
$ patch < QLColorCode-sass-less-compass.patch

Also, see my Drupal patch for QLColorCode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment