Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Language Detection Improvements #143576

Closed
3 tasks done
JacksonKearl opened this issue Feb 21, 2022 · 2 comments
Closed
3 tasks done

Test: Language Detection Improvements #143576

JacksonKearl opened this issue Feb 21, 2022 · 2 comments

Comments

@JacksonKearl
Copy link
Contributor

JacksonKearl commented Feb 21, 2022

Refs: #137104

Complexity: 3

Create Issue


Improved language detection for small inputs is (finally) out! Context:

  • If the existing model can detect the language, it is used
  • If not, we try a new model which detects with biasing from recently opened files, files in the workspace, and historically opened files.

Please test:

  • files are able to be detected with less text than before, and ambiguities can be influenced by workspace contents and recently opened. For example:
# hello world
- this 
- is

can be MD or YAML, so if you have recently opened MD and/or have md files in your workspace, md should be picked, otherwise YAML. Similarly:

class Foo {
   private foo: Foo
   constructor() {
      this.foo = ''
   }
}

can be CS or TS, and again your recent files should influence this.

  • working with very large untitled files doesn't have poor performance
  • can go back to old way of detection by disabling workbench.editor.historyBasedLanguageDetection
@sbatten
Copy link
Member

sbatten commented Feb 23, 2022

Will test this more tomorrow with the changes from today.

@TylerLeonhardt
Copy link
Member

Here's a list of good samples to test too.
#131450

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants