visual-studio-codeenvironment-variables

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.


Solution

  • 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
    },