-
Notifications
You must be signed in to change notification settings - Fork 39.8k
Add support for dotenv #267333
Copy link
Copy link
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
Milestone
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
The dotenv format uses subset of the bourne shell syntax to define key-value pairs.
Unlike other languages, files of this type are not recognizable by a name suffix (file extension). Instead, these files are typically recognizable by a name prefix. Some popular file names include:
.env.env.development.env.production.env.test.env.local.env.development.local.env.production.local.env.test.local.flaskenvuser-dirs.dirsThis format is supported by many popular environments, including the Node.js, Next.js, Flask, and the XDG user dir specification.
There are two popular existing Dotenv extensions:
The most popular is DotENV. It doesn’t specify the correct file patterns. Instead, it defines extensions. This extension was last updated 7 years ago.
The extension Dotenv Official +Vault looks more official. It has the same problem as DotENV, but additionally it writes to user settings as a workaround. This is solved by dotenv-org/dotenv-vscode#105, but this has gone unnoticed for over a year.
Both projects appear to be unmaintained. Given how commonly dotenv files are used, I think it would be good to include basic dotenv support in VSCode as a builtin extension.