Skip to content

Test: Automatic untitled file language detection #129436

@TylerLeonhardt

Description

@TylerLeonhardt

Refs: #129004

Complexity: 2

Create Issue


Try out the experimental automatic untitled file language detection!

Configure the setting:

  • runs regardless of what language mode you're currently in:
"workbench.editor.untitled.experimentalLanguageDetection": true
  • runs only on plaintext:
"[plaintext]" { "workbench.editor.untitled.experimentalLanguageDetection": true }
  • doesn't run on markdown:
"workbench.editor.untitled.experimentalLanguageDetection": true,
"[markdown]" { "workbench.editor.untitled.experimentalLanguageDetection": false }

Then paste a decent size chunk of code. Here are some ideas:
https://www.programiz.com/python-programming/examples
https://www.programiz.com/java-programming/examples

Notice that the language picker should show (Auto)... click on the language picker and notice that it has detected a language or two.
If you click on a language, notice that (auto) goes away and you are now locked into this language for the entire life of this untitled file.

Things to test:

  • perf: paste in a huge file, type in. Everything should still be smooth
  • setting works as expected
  • language picker is either not confident enough, or it's correct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions