Automatic disambiguation of file extensions
See original GitHub issueAs described in https://github.com/microsoft/vscode/issues/129004#issuecomment-882751887, I don’t feel the current behaviour file association is effective in VSC for full-stack or versatile programmers.
There is prior art in the form of neel1996/langline
although the heuristics implementation didn’t really inspire @TylerLeonhardt.
That package uses GitHub Linguist which is highly tested but relies on hardcoded regexes… as seen in https://github.com/github/linguist/blob/617fa486aad61043996e1323a429c900493c89a7/lib/linguist/heuristics.yml#L30 and other files.
The Tensorflow ML approach would be much more versatile than the Github Linguist NPM module, and other staff members mentioned using that for disambiguation. However, Linguist IDs would need to be matched to their corresponding languageId
. The ML would also need to be trained to recognise contributed language(s).
Also noting:
I also think there are different heuristics that would be better like looking at what other files are in the workspace and see what their modes are.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top GitHub Comments
Here’s an idea @TylerLeonhardt - what if we simply respect .gitattributes as well as workspace settings?
This is what I came here to suggest! Right now I have to duplicate
linguist-language
in.gitattributes
andfiles.associations
in.vscode/settings.json