Quick Look does not work for text files
I have been unable to use Quick Look for years to view text files with extensions like .m (Matlab), .c and .cpp (C and C++). This used to work, and I'm curious why it stopped. It's a nice feature and I'd like to be able to use it for source code files.
I have used tricks like
qlmanage -r
and
qlmanage
to reset the Quick Look cache, etc. That hasn't worked.
I also installed the QLStephen.qlgenerator package using Homebrew, and it still doesn't work.
I can still use Quick Look for previewing all sorts of other file types (.pdf, .pages, .tex/.bib, .ai for Adobe Illustrator, .html, .rtf, and .txt). But any file types for programming, like .h, .c, .cpp, .m, .py, don't work, and Matlab .fig files are similarly unviewable (whereas I used to be able to see them, I'm pretty sure).
I'm using a MacBook Pro (15" 2017), running macOS Sierra 10.12.6.
The contents of my /Library/QuickLook folder are:
DICOMQuickLook.qlgenerator QLStephen.qlgenerator iWork.qlgenerator
GBQLGenerator.qlgenerator iBooksAuthor.qlgenerator
The contents of my ~/Library/QuickLook folder are:
QLStephen.qlgenerator
The contents of /System/Library/QuickLook are:
Audio.qlgenerator Icon.qlgenerator Notes.qlgenerator StandardBundles.qlgenerator
Bookmark.qlgenerator Image.qlgenerator Office.qlgenerator Text.qlgenerator
Clippings.qlgenerator LivePhoto.qlgenerator PDF.qlgenerator Web.qlgenerator
Contact.qlgenerator LocPDF.qlgenerator Package.qlgenerator iBooks.qlgenerator
EPS.qlgenerator Mail.qlgenerator SceneKit.qlgenerator iCal.qlgenerator
Font.qlgenerator Movie.qlgenerator Security.qlgenerator iChat.qlgenerator
Also, whenever I use GetInfo for any of the unQuickLookable file types, I see the correct application listed under "Open With" (XCode, Matlab, etc.).
Any help would be much appreciated!
MacBook Pro (15-inch, 2017), macOS Sierra (10.12.6)