Colin Seymour
Colin Seymour
> @lildude Are there any other changes required before this PR can be merged? Yup. See the test failure.
We have a 1:1 relationship between languages and grammars. The best solution is for the grammar to be backwardly compatible with the older version of the language. The next best...
The [CONTRIBUTING.md](https://github.com/github-linguist/linguist/blob/master/CONTRIBUTING.md#adding-a-language) details how to add a new language and includes a link to the heuristics file where you can see how it's done with other languages.
🤔 Did you use the `script/add-grammar` script to replace the grammar?
> @lildude I tired doing > > ``` > script/add-grammar --replace vscode-just https://github.com/nefrob/vscode-just > ``` Can you please provide the output from this. This is the correct command so should...
Ooo, I think I might have hit the issue in as much as I don't get an error, but it doesn't switch the grammar either. Looks like something is caching...
Got it. For some reason the `.git/modules/vendor/grammars/vscode-just` directory isn't being removed. I'm not sure why but there's no harm manually removing it. I'll update the script and also push the...
This will be because the `.tsx` extension is shared with XML and the heuristic to differentiate the two is looking for react: https://github.com/github-linguist/linguist/blob/f0aebbe90d3b9b9bae5b7258f99370def1ee489f/lib/linguist/heuristics.yml#L781-L786 If the file doesn't match that or...
> 1\. In what cases could a file with the `.tsx` extension be treated as `XML`? I wonder if it might be better to remove this possibility, or is it...
> Could we make it assume that it is a .tsx file if it doesn't match any heuristics, perhaps using a negative_pattern? It already is a `.tsx` file 😉 If...