Skip to content

Test: Language Detection Improvements #143576

@JacksonKearl

Description

@JacksonKearl

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions