microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.64k stars 29.05k forks source link

.env file detected incorrectly as inf file #133165

Closed arikal closed 3 years ago

arikal commented 3 years ago

Issue Type: Bug

  1. Open an environment variables file named .env
  2. See in bottom-right that the file was detected as an inf file

This means that the file isn't handled by the configured extension, syntax highlighting is incorrect and adding comments adds ; instead of # which is invalid.

Note that it does handle files like .env.example correctly.

Workaround is to click Select Language Mode and choose Environment Variables, but this must be done each time the file is opened.

VS Code version: Code 1.60.0 (e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff, 2021-09-01T10:43:02.136Z) OS version: Linux x64 5.11.0-7633-generic Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (4 x 2600)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|1, 1, 2| |Memory (System)|22.99GB (8.04GB free)| |Process Argv|--unity-launch --crash-reporter-id b64626b7-78ff-41e3-b0f9-d4559c7f9764| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|pop| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|pop| |XDG_SESSION_TYPE|x11|
Extensions (16) Extension|Author (truncated)|Version ---|---|--- unique-lines|bib|1.0.0 vscode-intelephense-client|bme|1.7.1 vue-peek|dar|1.0.2 gitlens|eam|11.6.0 phpunit|ema|4.1.1 php-debug|fel|1.18.0 code-runner|for|0.11.5 go|gol|0.27.2 beautify|Hoo|1.5.0 dotenv|mik|1.0.1 vscode-docker|ms-|1.16.1 remote-containers|ms-|0.194.0 cpptools|ms-|1.6.0 php-docblocker|nei|2.4.0 vetur|oct|0.34.1 vim|vsc|1.21.7 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551cf:30345471 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscorecescf:30358481 pythondataviewer:30285071 pythonvsuse255:30340121 vscod805cf:30301675 pythonvspyt200:30340761 vscextlangct:30333562 binariesv615:30325510 vsccppwt:30364497 pythonvssor306:30344512 bridge0708:30335490 pygetstartedc2:30360494 bridge0723:30353136 pythonrunftest32cf:30365367 pythonf5test824cf:30361778 javagetstartedc:30364665 pythonvspyt187cf:30365362 pydsgsc2:30361791 vssid140:30363603 vssur157:30365996 ```
IllusionMH commented 3 years ago

/duplicate of #132173

You need to update to latest stable version 1.60.1

arikal commented 3 years ago

Sorted, thank you.