Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>ENV HighlighterNew to Visual Studio Code? Get it now.
ENV Highlighter

ENV Highlighter

Akash

|
3 installs
| (0) | Free
Proper syntax highlighting for .env files — keys, string values, and numbers all distinctly colored
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ENV Highlighter

Syntax highlighting for .env files in VS Code. Keys, values, numbers, booleans, comments, and interpolations are each given distinct scopes so they color correctly in any theme.

Features

  • Highlights env keys, values, numbers, booleans, and comments
  • Supports quoted strings, export, and ${VAR} interpolation
  • Matches common env file patterns automatically

Supported tokens

Token Example Scope
Key POSTGRES_USER keyword.other.env.key.dotenv
= separator = punctuation.separator.key-value.dotenv
String value postgres string.unquoted.value.dotenv
Quoted string "hello world" string.quoted.double.dotenv
Number 3600 constant.numeric.dotenv
Boolean true / false constant.language.boolean.dotenv
Comment # comment comment.line.number-sign.dotenv
Export keyword export keyword.other.export.dotenv
Interpolation ${VAR} variable.other.interpolated.dotenv

File matching

Automatically applies to:

  • .env
  • .env.local, .env.production, .env.development, etc.
  • any_name.env

Installation

From the Marketplace (recommended)

  1. Open VS Code.
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X).
  3. Search for ENV Highlighter.
  4. Click Install.

Or install from the command line:

code --install-extension env-highlighter.env-highlighter

Manual install

  1. Download or clone this repo.
  2. Copy the folder to your VS Code extensions directory:
    • Windows: %USERPROFILE%\.vscode\extensions\
    • macOS/Linux: ~/.vscode/extensions/
  3. Restart VS Code.

Install from VSIX

code --install-extension env-highlighter-1.0.0.vsix

Customization

You can override colors in your settings.json:

{
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "keyword.other.env.key.dotenv",
        "settings": { "foreground": "#C586C0" }
      },
      {
        "scope": "string.unquoted.value.dotenv",
        "settings": { "foreground": "#CE9178" }
      }
    ]
  }
}

Development

# Package the extension
npx @vscode/vsce package

# Publish (requires marketplace publisher + PAT)
npx @vscode/vsce publish

Open this folder in VS Code and press F5 to launch an Extension Development Host for local testing.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft