question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatic disambiguation of file extensions

See original GitHub issue

As 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:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Jul 23, 2021

Here’s an idea @TylerLeonhardt - what if we simply respect .gitattributes as well as workspace settings?

0reactions
Avasamcommented, Nov 29, 2022

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 and files.associations in .vscode/settings.json

Read more comments on GitHub >

github_iconTop Results From Across the Web

.dss - Wikipedia
.dss is a filename extension. It may refer to: ... This disambiguation page lists articles associated with the title .dss. If an internal...
Read more >
Default Disambiguation for Online Parsers
The nature of the problem means that default disambiguation cannot always match a user's intention. However, our experimental evaluation shows that automatic ......
Read more >
About Form 4868, Application for Automatic Extension of Time ...
A U.S. citizen or resident files this form to request an automatic extension of time to file a U.S. individual income tax return....
Read more >
(PDF) Baseline Methods for Automatic Disambiguation of ...
Baseline Methods for Automatic Disambiguation of Abbreviations in Jewish Law ... text file types and further research of new abbreviations, ...
Read more >
Semi-automated protocol disambiguation and code generation
NATO Science for Peace and Security Series (2014). http://sygus. seas. upenn. edu/files/sygusextended. pdf (2014).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found