github/linguist — pull request #1762 by gjtorikian (2014-11-24 05:31:19+00:00)
Title: Add missing `ace_mode` values wherever necessary

GitHub and Gist use Linguist's `ace_mode` to determine which highlighter Ace should use when editing a file. When `ace_mode` is not provided, the default value is to just use the language's name, in lowercase.

For the most part, most languages have an `ace_mode` defined, and/or the lowercase default is fine. In other cases, however, this is broken. Consider the following gif:

![go](https://cloud.githubusercontent.com/assets/64050/5161183/99149846-7356-11e4-8fea-eff3086eb5a8.gif)

Lest you think that's an obscure language, that broken highlighter is for Go. While the language is itself called "Go," the Ace mode is actually called [*golang*](https://github.com/ajaxorg/ace/blob/a50fe349250dded26ade026fb1874b7fe681e5b9/lib/ace/mode/golang.js). This property in *languages.yml* did not have `ace_mode` defined, so the default value did not work, hence the lack of highlighting.

This happens for an irritating number of popular languages ("Common Lisp" should have a highlighter of "lisp"; "Objective-C" is "objectivec"). I [scripted something up](https://gist.github.com/gjtorikian/3e6b307243ff9b3a9b34) to dump out a list of languages that should probably have an `ace_mode` defined (as expected by Ace). Then, I manually went through the list and applied the `ace_mode`s.

Verification is pretty simple; in most cases, the `ace_mode` simply matches very closely with the `tm_scope`. Here's an example of what I mean:

``` yaml
Frege:
type: programming
color: "#00cafe"
extensions:
- .fr
tm_scope: source.haskell
ace_mode: haskell
```

Although I have no idea what the Frege language is, I feel pretty confident that a `tm_scope` of `source.haskell` means the `ace_mode` should be `haskell`, too. Almost all of the matches are like this. Note that there are still about 40 languages left that have broken syntax highlighting, but the onus here is shifted onto Ace. because highlighters don't exist for them (for example, Cucumber and F# are represented in Linguist and with a `tm_scope`, but Ace has no highlighter for them).

/cc @github/languages @spicycode