While browsing files in Finder, if you want QuickLook to display the contents of the any text (txt, json, xml, md and etc.) files, you should run the following commands in your terminal:
** I am assuming you have Homebrew installed.
brew cask install qlstephen brew cask install qlcolorcode
It should say “brew cask”, not “brew cast”.
Thanks! I fixed it.