From 367ab71bf614f52d998a9ec37e5f5e3d244e3039 Mon Sep 17 00:00:00 2001 From: Shtian Date: Wed, 3 Jun 2026 08:23:30 +0200 Subject: [PATCH 1/6] fix(vscode-plugin): allow # in unquoted fn-call string values --- packages/vscode-plugin/language/env-spec.tmLanguage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vscode-plugin/language/env-spec.tmLanguage.json b/packages/vscode-plugin/language/env-spec.tmLanguage.json index 2c6047203..33ac19f80 100644 --- a/packages/vscode-plugin/language/env-spec.tmLanguage.json +++ b/packages/vscode-plugin/language/env-spec.tmLanguage.json @@ -629,7 +629,7 @@ "unquoted-string-within-fn-call": { "comment": "unquoted string value within fn call", - "match": "([^ \n#,)$]+)", + "match": "([^ \n,)$]+)", "name": "string.unquoted.env-spec", "captures": { "1": { From 0ee892ae782a69e908e83b91d30d8acf73868522 Mon Sep 17 00:00:00 2001 From: Shtian Date: Wed, 3 Jun 2026 08:23:40 +0200 Subject: [PATCH 2/6] test(vscode-plugin): add grammar tests for URL fragments and multi-line decorators --- packages/vscode-plugin/test/grammar.test.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/vscode-plugin/test/grammar.test.txt b/packages/vscode-plugin/test/grammar.test.txt index 6b89d65dc..c9cf89a1b 100644 --- a/packages/vscode-plugin/test/grammar.test.txt +++ b/packages/vscode-plugin/test/grammar.test.txt @@ -61,6 +61,20 @@ EXAMPLE_VAR=test # <- comment.line.env-spec DEC_FN_VAR=test +# @docs(https://varlock.dev/env-spec/overview/#a-short-example) +# <- comment.line.env-spec +# ^^^^^^^^^^^^^^^^ string.unquoted.env-spec +DOCS_FRAGMENT_VAR=test + +# @type( +# string, +# ^^^^^^ string.unquoted.env-spec +# number +# ^^^^^^ string.unquoted.env-spec +# ) +# ^ punctuation.section.parens.end.env-spec +MULTI_DEC_VAR=test + # ====================== # Variable expansion # ====================== From c3b1a0d58ac08f81d94f5fb82abe7d79915c2579 Mon Sep 17 00:00:00 2001 From: Shtian Date: Wed, 3 Jun 2026 08:23:45 +0200 Subject: [PATCH 3/6] docs: update examples to use @docs() decorator syntax --- packages/env-spec-parser/README.md | 2 +- packages/vscode-plugin/.env.example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/env-spec-parser/README.md b/packages/env-spec-parser/README.md index 3c373f238..9c0ed0f78 100644 --- a/packages/env-spec-parser/README.md +++ b/packages/env-spec-parser/README.md @@ -10,7 +10,7 @@ _Here is a short illustrative example:_ ```dotenv # Stripe secret api key # @required @sensitive @type=string(startsWith="sk_") -# @docsUrl=https://docs.stripe.com/keys +# @docs(https://docs.stripe.com/keys) STRIPE_SECRET_KEY=encrypted("asdfqwerqwe2374298374lksdjflksdjf981273948okjdfksdl") ``` diff --git a/packages/vscode-plugin/.env.example b/packages/vscode-plugin/.env.example index 7e1ab7f92..67fe9cf40 100644 --- a/packages/vscode-plugin/.env.example +++ b/packages/vscode-plugin/.env.example @@ -16,7 +16,7 @@ APP_ENV=remap($WORKERS_CI_BRANCH, "main", production, regex(.*), preview, undefi # OpenAI API Key # @required @sensitive @type=string(startsWith=sk-) -# @docsUrl=https://platform.openai.com/docs/api-reference/authentication +# @docs(https://developers.openai.com/api/reference/overview#authentication) OPENAI_API_KEY=exec('op read "op://api-config-prod/openai/api-key"') From ee2f7cf628dbf88d6fb4a3141e00a831e6d055fb Mon Sep 17 00:00:00 2001 From: Shtian Date: Wed, 3 Jun 2026 08:27:14 +0200 Subject: [PATCH 4/6] chore: add bump file for url fragment highlighting fix --- .bumpy/fix-vscode-url-fragment-highlighting.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .bumpy/fix-vscode-url-fragment-highlighting.md diff --git a/.bumpy/fix-vscode-url-fragment-highlighting.md b/.bumpy/fix-vscode-url-fragment-highlighting.md new file mode 100644 index 000000000..514681520 --- /dev/null +++ b/.bumpy/fix-vscode-url-fragment-highlighting.md @@ -0,0 +1,6 @@ +--- +env-spec-language: patch +"@env-spec/parser": patch +--- + +Fixed URL fragments in @docs() decorator not being highlighted correctly. From 762ac438500792a3c8e66213533462fbb3c91976 Mon Sep 17 00:00:00 2001 From: CI Date: Wed, 3 Jun 2026 15:17:46 -0700 Subject: [PATCH 5/6] chore: drop unnecessary @env-spec/parser bump --- .bumpy/fix-vscode-url-fragment-highlighting.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.bumpy/fix-vscode-url-fragment-highlighting.md b/.bumpy/fix-vscode-url-fragment-highlighting.md index 514681520..9d23280a8 100644 --- a/.bumpy/fix-vscode-url-fragment-highlighting.md +++ b/.bumpy/fix-vscode-url-fragment-highlighting.md @@ -1,6 +1,5 @@ --- env-spec-language: patch -"@env-spec/parser": patch --- Fixed URL fragments in @docs() decorator not being highlighted correctly. From ac08816b4e041d563c0f9b4aa244e406af39c66c Mon Sep 17 00:00:00 2001 From: CI Date: Wed, 3 Jun 2026 15:18:33 -0700 Subject: [PATCH 6/6] Revert "chore: drop unnecessary @env-spec/parser bump" This reverts commit 762ac438500792a3c8e66213533462fbb3c91976. --- .bumpy/fix-vscode-url-fragment-highlighting.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.bumpy/fix-vscode-url-fragment-highlighting.md b/.bumpy/fix-vscode-url-fragment-highlighting.md index 9d23280a8..514681520 100644 --- a/.bumpy/fix-vscode-url-fragment-highlighting.md +++ b/.bumpy/fix-vscode-url-fragment-highlighting.md @@ -1,5 +1,6 @@ --- env-spec-language: patch +"@env-spec/parser": patch --- Fixed URL fragments in @docs() decorator not being highlighted correctly.