Searching Specific File Types with consult-ripgrep in Emacs

2025-03-19

If you're using Emacs with consult-ripgrep (M-x consult-ripgrep), you might want to search only within certain file types—say, just .scala files in a project. Here's the trick:

M-x consult-ripgrep RET -- -g '*.scala'
M-x consult-ripgrep RET -- -g '*.scala' -g '*.sbt'