Syntax Look
Why .zshrc and .gitignore preview as nothing
Press Space on .zshrc, .gitignore, .env, or Brewfile and macOS shows you an icon. No text, no preview, nothing to read.
Why it happens
macOS decides how to handle a file by its Uniform Type Identifier, and it works that out mostly from the extension. notes.txt is plain text because of .txt.
A dotfile has no extension. .zshrc looks like it does—there is a dot right there—but that dot is the start of the filename, marking it hidden, not a separator before a type. There is nothing after it to identify.
With no UTI to match, macOS has no registered previewer, so Quick Look shows the generic fallback. The file is perfectly readable text; nothing has been told to read it.
Makefile, Dockerfile, Brewfile, Procfile and LICENSE hit the same wall from the other direction—a name with no extension at all.
What you can do without any software
Two things work today.
Open it in a text editor. Reliable, and slower than the thing you were trying to avoid.
Read it in Terminal. cat ~/.zshrc or bat ~/.gitignore if you have bat installed. Fine when you are already in a shell, no help when you are looking at a folder in Finder.
What Syntax Look does
It registers for these filenames specifically, so pressing Space on .zshrc, .gitignore, .env or a Dockerfile gives you the contents, highlighted for the right syntax, with selectable text.
Shell files get shell highlighting. Dockerfile gets Dockerfile highlighting rather than being treated as anonymous text.
One thing to know: a Quick Look extension shows no change at all until it is switched on. If you have installed it and dotfiles still preview as an icon, that is almost certainly the reason—see Quick Look extension not working.