sourcegraph / zoekt

Fast trigram based code search
Apache License 2.0
598 stars 80 forks source link

Add support for Magik and PKl languages that are not handled by Linguist #790

Closed mmanela closed 3 months ago

mmanela commented 3 months ago

There are languages which Linguist doesn't plan to handle but we want to still support. This change allows us to define our own list of these languages as a fallback for when linguist (and go-enry) do not know about a language.

Part of https://linear.app/sourcegraph/issue/GRAPH-622/magik-search-filter-support

keegancsmith commented 3 months ago

Your approach looks correct to me. However, I believe we want to ensure both sourcegraph and zoekt use the same logic for file type identification. In that case it may be fine for us to just import zoekt, but more than likely @varungandhi-src has a better idea. I know he was exploring consistency in language identification a few months ago.