Let earch in a file following the option --[no]heading. As if searching in the editor(eg. vim), with Ag --nogroup <cword> % the editor can lotate the search result with the file name and line number