Skip to content

VSCode uses incorrect language detection despite files.associations #132568

@drew-cruise

Description

@drew-cruise

Issue Type: Bug

Immediately after I open a Bazel "BUILD" file, the file langauge is correct, however after a couple seconds, VSCode will change the language to something that is incorrect (sometimes R, sometimes Julia, sometimes Lua). This is despite having these lines in my configuration:

"files.associations": {
  "BUILD": "bazel"
}

VS Code version: Code 1.60.0 (e7d7e9a, 2021-09-01T10:54:53.442Z)
OS version: Darwin x64 20.5.0
Restricted Mode: No
Remote OS version: Linux x64 5.4.0-1051-gcp

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.57GB free)
Process Argv --crash-reporter-id bde18b96-be2b-4a7a-8d88-73477c0e5fab
Screen Reader no
VM 0%
Item Value
Remote SSH: cruise
OS Linux x64 5.4.0-1051-gcp
CPUs Intel(R) Xeon(R) CPU @ 2.30GHz (32 x 2299)
Memory (System) 117.93GB (41.36GB free)
VM 0%
Extensions (9)
Extension Author (truncated) Version
vs-cruise cru 0.1.4
remote-ssh ms- 0.65.7
remote-ssh-edit ms- 0.65.7
vscode-bazel Baz 0.4.1
vs-cruise cru 0.1.1
bazel-code Dev 0.1.9
gitlens eam 11.6.0
cpptools ms- 1.6.0
clang-format xav 1.9.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805cf:30301675
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30360495
bridge0723:30353136
pythonf5test824cf:30361778
vsdyn478:30356813
pythonvspyt187cf:30362783
pydsgsc2:30361791
vscus224cf:30358040
vssid140:30362080

Screen.Recording.2021-09-07.at.11.14.00.AM.mov

Metadata

Metadata

Labels

*duplicateIssue identified as a duplicate of another issue(s)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions