Description
files.associations does not appear to be applied automatically when opening a file.
Example configuration:
{
"files.associations": {
"*.ts": "javascript"
}
}
When opening a .ts file, the editor status shows Auto Detect, but the file is still highlighted as plain text.
Syntax highlighting only starts working after manually opening the language selector and re-selecting Auto Detect (even though it is already selected).
Steps to reproduce
- Add the following to
settings.json:
{
"files.associations": {
"*.ts": "javascript"
}
}
- Open a
.ts file using edit
- Observe that the file opens as plain text
- Open the language selector and select
Auto Detect again
- Observe that JavaScript highlighting is now applied correctly
Expected behavior
Auto Detect should automatically apply files.associations when opening the file.
Actual behavior
files.associations is only applied after manually re-triggering Auto Detect.
Environment
- Windows Terminal Version:
1.24.11321.0
Description
files.associationsdoes not appear to be applied automatically when opening a file.Example configuration:
{ "files.associations": { "*.ts": "javascript" } }When opening a
.tsfile, the editor status showsAuto Detect, but the file is still highlighted as plain text.Syntax highlighting only starts working after manually opening the language selector and re-selecting
Auto Detect(even though it is already selected).Steps to reproduce
settings.json:{ "files.associations": { "*.ts": "javascript" } }.tsfile usingeditAuto DetectagainExpected behavior
Auto Detectshould automatically applyfiles.associationswhen opening the file.Actual behavior
files.associationsis only applied after manually re-triggeringAuto Detect.Environment
1.24.11321.0