Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
# Change Log

## v1.2.7 <sub>(June 21, 2026)</sub>

### Fixed
- Fixed enum autocompletion for rest arguments
- Fixed `$c[]` not highlighted as comment inside functions

## v1.2.6 <sub>(June 19, 2026)</sub>

### Added
Expand Down
7 changes: 3 additions & 4 deletions out/autocompletion.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion out/autocompletion.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions out/web/extension.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions out/web/extension.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
"displayName": "ForgeVSC",
"description": "%extension.description%",
"publisher": "tryforge",
"version": "1.2.6",
"version": "1.2.7",
"icon": "./assets/ForgeScript.png",
"main": "./out/extension.js",
"browser": "./out/web/extension.js",
Expand Down
6 changes: 3 additions & 3 deletions src/autocompletion.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -83,10 +83,10 @@ export function registerAutocompletion(ctx: vscode.ExtensionContext) {
const lastIndex = args.length - 1

const parts = splitArgs(argsTyped)
let activeIndex = parts.length - 1
if (args[lastIndex]?.rest) activeIndex = Math.min(activeIndex, lastIndex)
const activeIndex = parts.length - 1
const argIndex = args[lastIndex]?.rest ? Math.min(activeIndex, lastIndex) : activeIndex

const activeArg = args[activeIndex]
const activeArg = args[argIndex]
const enumValues = activeArg?.enum || (activeArg.type === "Boolean" ? ["true", "false"] : undefined)

if (enumValues) {
Expand Down
1 change: 1 addition & 0 deletions syntaxes/forge.tmLanguage.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,6 +75,7 @@
"1": { "name": "punctuation.section.brackets.end.forge" }
},
"patterns": [
{ "include": "#forge-comment" },
{ "include": "#djs-eval" },
{ "include": "#forge-brackets" }
]
Expand Down