在 VSCode 中,我曾经能够在资源管理器视图中看到我的
.env
我还有其他文件
.env.staging
.env.production
我目前使用的唯一插件是 Vim,但我禁用了它,问题仍然存在。
前往您的
settings.json
找到
"files.exclude"
"files.exclude": { "**/.classpath": true, "**/.factorypath": true, "**/.project": true, "**/.settings": true, "**/node_modules": true // "**/.env": true },
就我而言,这是由于 .env 文件被 Git 忽略,并且在设置中设置了以下复选框: