Skip to content

Add Support for Syntax Highlighting of .env / Environment Variable Files #4041

@2400032210

Description

@2400032210

Hi Prism team,
I would like to request support for syntax highlighting of .env files (environment variable configuration files).

Why This Feature Is Useful

.env files are widely used in:

Node.js

Python

Docker

PHP / Laravel

Frontend frameworks (Next.js, Nuxt, Vite)

CI/CD pipelines

Having syntax highlighting would improve readability by visually distinguishing:

Keys

Values

Comments (# comment)

Variable expansions (${VAR})

Proposed Approach

A new language definition such as:

prism-env
or

dotenv

Suggested Highlighting Rules

Keys: KEY_NAME

Assignment operator: =

Values: strings, numbers, booleans

Comments: lines starting with #

Variable references: ${VAR_NAME}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions