vscode-dotenv icon indicating copy to clipboard operation
vscode-dotenv copied to clipboard

Support .env.prod

Open fabiospampinato opened this issue 5 years ago • 6 comments

Since .env.dev and .env.stag are explicitly supported I think .env.prod should be supported too.

fabiospampinato avatar Sep 19 '19 01:09 fabiospampinato

Also, Zeit Now supports .env.build:

https://zeit.co/docs/v2/environment-variables-and-secrets#local-development

Instead of trying to whitelist know variations, it's easier to just do:

{
  "files.associations": {
    "*.env.*": "dotenv"
  }
}

jaydenseric avatar Oct 21 '19 06:10 jaydenseric

Yes please! @jaydenseric's suggestion also supports files I have .env.stage .env.live etc etc

sampl avatar Nov 22 '19 14:11 sampl

@jaydenseric when contributing a language extension you need to provide the explicit extensions from what I've tested (I tried pattern matching to begin with).

What you're talking about is something I've described in the readme around vscode settings, but I don't see a way to do this in an extension itself.

Are you able to provide more details / references of how to achieve this in an extension, or perhaps your comment was aimed at @fabiospampinato and not the extension itself?

mikestead avatar Nov 24 '19 02:11 mikestead

meanwhile, can we please have support for .env.prod , .env.build until we figure out the way to whitelist based on patterns?

GorvGoyl avatar May 21 '20 18:05 GorvGoyl

lol.. I'm not proud of it but we can set language mod for *.prod file as python or makefile to get syntax highlighting and # comment support.

"files.associations": {
    ".env.prod": "python"  // "makefile"
  }

GorvGoyl avatar May 21 '20 18:05 GorvGoyl

@jaydenseric thank you... just did ".env.*" for myself... I generally only commit a .env.sample which works for local/development, but must explicitly copy to .env (git ignored) local to run... other environments never committed, never set.

tracker1 avatar Nov 15 '21 17:11 tracker1