Skip to content

matej/vscode-extension-intellisense#370

Open
voiys wants to merge 3 commits intodmno-dev:mainfrom
voiys:matej/vscode-extension-intellisense
Open

matej/vscode-extension-intellisense#370
voiys wants to merge 3 commits intodmno-dev:mainfrom
voiys:matej/vscode-extension-intellisense

Conversation

@voiys
Copy link

@voiys voiys commented Mar 11, 2026

Summary

This PR upgrades the @env-spec VS Code extension with a much more complete editing experience for schema-style .env files.

It adds:

  • IntelliSense for decorators, @type= values, type options, resolver functions, and $KEY references
  • enum value completion on the config item line below @type=enum(...)
  • inline diagnostics for invalid enum values, incompatible decorators, duplicate single-use decorators, and obvious static @type mismatches
  • a root-level VS Code debug flow for developing the extension from the monorepo root
  • unit test coverage for the new completion and diagnostics logic
  • updated extension marketplace docs and website docs with demos

Demo

Decorator and @type completion

Decorator and type completion

General type option completion

General type option completion

Email-specific option completion

Email option completion

Enum value completion

Enum value completion

Variable reference completion

Key reference completion

Incompatible decorator filtering and diagnostics

Incompatible decorators

Prefix-related completion or validation

Prefix behavior

prependHttps URL validation

prependHttps validation

Test Plan

  • bun run --filter env-spec-language build
  • bun run --filter env-spec-language test:ci
  • bun run lint:fix
  • Run the docs site locally and verify the updated extension docs page
  • Launch the extension host with F5 from the repo root and manually verify completions and diagnostics in a .env / .env.schema file

Notes

  • The extension behavior tests are implemented as pure Vitest unit tests instead of extension-host integration tests, which keeps them aligned with the repo’s existing testing style.
  • This PR also updates the extension README used for the VS Code Marketplace / Open VSX listing.
  • A changeset is included since this touches a published package.

@changeset-bot
Copy link

changeset-bot bot commented Mar 11, 2026

🦋 Changeset detected

Latest commit: f71c7d1

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

This PR includes changesets to release 1 package
Name Type
env-spec-language 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

@voiys
Copy link
Author

voiys commented Mar 11, 2026

Hi guys, I stumbled upon your repo on twitter and as something I know I'll use to the max I just wanted to add my 2 cents and implement autocomplete bc I was missing that in regular usage. I'm not emotionally attached to this PR and you can close it if you think this is too much but I thought it would be good to have intellisense bc of how concrete the tool is. Keep up the good work! Greetings from Croatia, Mat

@theoephraim
Copy link
Member

this is AMAZING 🧙‍♂️ Better intellisense has been on the to-do list but I just hadn't gotten back to it yet.

Still lots of fun future things to do in the future, but this is a huge improvement!

@voiys
Copy link
Author

voiys commented Mar 11, 2026

this is AMAZING 🧙‍♂️ Better intellisense has been on the to-do list but I just hadn't gotten back to it yet.

Still lots of fun future things to do in the future, but this is a huge improvement!

Thanks ^^ there's still some things lacking (ex. env keys aren't validated the same way as direct values) but for v1 I think it's a big improvement. Would love to get to a point where the schema can validate my actual sibling env files or smth like that, would save me a lot of headaches

@theoephraim
Copy link
Member

not quite sure what you mean by "Would love to get to a point where the schema can validate my actual sibling env files or smth like that, would save me a lot of headaches" but would love to help.

hop in the discord - https://chat.dmno.dev

@voiys
Copy link
Author

voiys commented Mar 11, 2026

not quite sure what you mean by "Would love to get to a point where the schema can validate my actual sibling env files or smth like that, would save me a lot of headaches" but would love to help.

hop in the discord - https://chat.dmno.dev

Kind of like you define a schema via zod (or ur other favorite validation library) and then you validate data, that's how I'd like to have .env.schama behave towards .env files intellisense-wise (hope this makes sense)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants