I have installed the QLColorCode plugin from this site, so that I can Quick Look JavaScript and CSS files, but it's not working. Pressing the space bar on a code file just shows the icon.
Removing the plugin has no effect either.
Is there another way to Quick Look source code files in macOS?
Best Answer
You don't need any 3rd plugin plugins to Quick Look source code/ASCII text files. Invoking Quick Look by pressing the spacebar on JavaScript/CSS source code file (which are plain text ASCII encoded) will show you the plain source code text.
Here's what QuickLook shows when invoking Quick Look on a JavaScript file named
callback.js
:Installing QLColorCode using Homebrew by running
brew cask install qlcolorcode
and invoking Quick Look on the same file immediately thereafter shows this color coded output:Follow the installation instructions on the project homepage to make sure your have correctly installed the plugin: