Skip to content

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

Created by: slimsag

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