Use ripgrep switches before or after--. E.g. #-t lua -- test or #test -- -t lua. I’ll use the latter for examples below.
To only search lua files: #test -- -t lua. Run $ rg --type-list for comprehensive list of types that Ripgrep supports.
To search any file that matches a glob: #test -- -g*.tar.gz
To search for test, but filter out results with cd in it, use consult’s sub-search feature: #test#!cd.
Everything before the second # is filtered by ripgrep.
Everything after the second # is filtered by Vertico using Orderless, where ! (negatation), = (literal), ~ (fuzzy), % (case insensitive) prefixes are supported.
The # delimiter can be replaced with any arbitrary character. E.g. %test%!cd or *test*!cd.