There is no setting in macOS to enable markdown support. However, Quick Look does allow for third party plugins to extend the base behavior. The QLMarkdown plugin is one such plugin that allows Markdown files to be read.
You can install it either by:
- Download the
QLMarkdown.qlgenerator in either
~/Library/QuickLook (current user) or
/Library/QuickLook (all users).
- Using Homebrew, run
brew cask install qlmarkdown in the Terminal
After that, you should be able to view markdown files.
Getting it to work on macOS Catalina - Source
If you got the security warning as shown below, go to
System Preferences / Security & Privacy / General and click
Allow Anyway at the bottom.
Now try to Quicklook a markdown file again. If it still doesn't work, run the following commands in your terminal.
brew cask install qlmarkdown
xattr -cr ~/Library/QuickLook/QLMarkdown.qlgenerator
qlmanage -r cache
killall Finder # relaunch finder
It should hopefully work now.