Skip to content

search: infer file extensions from lang scope

Warren Gifford requested to merge rvt/infer-file-extensions-from-lang-scope into master

Created by: rvantonder

When lang:c or such is specified, a regex pattern like \.c$|\.cats$|\.h$|\.idc$ populates includePatterns. This PR heuristically converts the patterns to file extensions like .c and .h, which comby can use to infer the language.

Note that without the lang specifier, comby will infer the language based on the first file to search as returned by Zoekt, so this PR is just a heuristic that ensures that the lang keyword is honored.

Merge request reports

Loading