Skip to content

feat(astro-vscode): adds a file association for .dev.vars to render it as a .env file#16761

Open
alexanderdombroski wants to merge 2 commits into
withastro:mainfrom
alexanderdombroski:env-file-association
Open

feat(astro-vscode): adds a file association for .dev.vars to render it as a .env file#16761
alexanderdombroski wants to merge 2 commits into
withastro:mainfrom
alexanderdombroski:env-file-association

Conversation

@alexanderdombroski
Copy link
Copy Markdown
Contributor

Changes

Assigns VS Code's registered dotenv language to .dev.vars env file used in the Cloudflare adapter.

Astro recommends using this file to store development-only environment variables when using the Cloudflare adapter, but VS Code displays it as plaintext rather than a dotenv file. This is the fix.

  • I included a changeset with this change

Before / After

Screenshot 2026-05-16 at 8 47 08 AM Screenshot 2026-05-16 at 8 46 33 AM

Testing

Tested using VS Code extension test runner.

Docs

Documentation exists for this file. Syntax highlighting will reassure new developers using Astro & Cloudflare workers that they are following documentation correctly.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 16, 2026

🦋 Changeset detected

Latest commit: bf47774

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
astro-vscode Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@alexanderdombroski alexanderdombroski changed the title feat: adds a file association for .dev.vars to render it as a .env file feat(astro-vscode): adds a file association for .dev.vars to render it as a .env file May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant