lando2319
lando2319

Reputation: 1810

My .env file is invisible in VSCode, can't search for it, can't see it

In VSCode I used to be able to see my .env file on the explorer view and search for it using 'go to file', I'm not sure what happened but now my .env is invisible, can't search for it, can't see it.

I have other files .env.staging .env.production these all show up just find, but for some reason .env is invisible

The only pluggin I'm currently using is Vim, but I disabled it and the issue remains.

Upvotes: 1

Views: 3008

Answers (3)

Fabricio Elias
Fabricio Elias

Reputation: 1

in december/2024:

only set this value to false in settings.json

"explorer.excludeGitIgnore": false,

or set in this option

https://imgur.com/tVvHIpi

Upvotes: 0

Ariod
Ariod

Reputation: 5851

In my case, it was due to the .env file being Git-ignored, and the following checkbox was set in the settings:

enter image description here

Upvotes: 1

Samathingamajig
Samathingamajig

Reputation: 13283

Go to your settings.json

enter image description here

find "files.exclude" and either comment out or remove .env

"files.exclude": {
  "**/.classpath": true,
  "**/.factorypath": true,
  "**/.project": true,
  "**/.settings": true,
  "**/node_modules": true
  // "**/.env": true
},

Upvotes: 5

Related Questions