how to Quick Look text files with custom file extensions in Finder
Solution 1:
update
With the new macOS release in 2019, the macOS Catalina, this approach is banned.
Install QLStephen, a QuickLook plugin that enables viewing of text files with arbitrary filetypes.
To install, copy the *.qlgenerator
file to ~/Library/QuickLook/
.