sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.29k forks source link

enable syntect server to lookup language by name, remove hard-coded map #1247

Open slimsag opened 5 years ago

slimsag commented 5 years ago

syntect has the ability to lookup syntaxes by name and the syntect_server API could expose it. However, we cannot expose it directly because it isn't perfect (e.g. the name for the fish shell syntax is friendly interactive shell (fish) instead of just fish. Likewise for many others.

For now, we use this hard-coded map, which is good enough in most cases:

https://github.com/sourcegraph/sourcegraph/commit/1959461d9e6bb20987091f9a8546bc073b84c28f#r31576274

stale[bot] commented 5 years ago

Please post an update or close this with an explanation if it is no longer relevant. This will be closed automatically if there is no more activity.