Skip to content

files.associations only applies after manually re-selecting "Auto Detect" #867

@ms-Fivano

Description

@ms-Fivano

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

  1. Add the following to settings.json:
{
  "files.associations": {
    "*.ts": "javascript"
  }
}
  1. Open a .ts file using edit
  2. Observe that the file opens as plain text
  3. Open the language selector and select Auto Detect again
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions