diff --git a/src/completion.ts b/src/completion.ts index a0fbdb4..9f41958 100644 --- a/src/completion.ts +++ b/src/completion.ts @@ -31,6 +31,7 @@ import commandCompletions from "./completion/commandCompletion"; import parameterTypeCompletions from "./completion/parameterTypeCompletion"; import { ItemVariant } from "./item"; import { AnnotationVariant } from "./annotation"; +import { PickupFlagVariant } from "./pickupFlag"; import { FlagVariant } from "./flag"; import { ParseError } from "wotw-seedgen"; import { Slot } from "./item/slot"; @@ -89,6 +90,7 @@ export function offerCompletions(error: ParseError, text: string): CompletionIte case "HeaderCommand": return commandCompletions; case "ParameterType": return parameterTypeCompletions; case "Annotation": return getNameCompletions(AnnotationVariant); + case "PickupFlag": return getNameCompletions(PickupFlagVariant); // case CompletionVariant.flag: return getNameCompletions(FlagVariant); default: vscode.window.showWarningMessage(`Received unknown completion request "${completion}"`); diff --git a/src/pickupFlag.ts b/src/pickupFlag.ts new file mode 100644 index 0000000..0031f7c --- /dev/null +++ b/src/pickupFlag.ts @@ -0,0 +1,3 @@ +export enum PickupFlagVariant { + mute, +} diff --git a/syntaxes/ori-wotw-header.tmLanguage.json b/syntaxes/ori-wotw-header.tmLanguage.json index f8288d9..cd88bf7 100644 --- a/syntaxes/ori-wotw-header.tmLanguage.json +++ b/syntaxes/ori-wotw-header.tmLanguage.json @@ -44,7 +44,8 @@ "2": { "name": "keyword.control" } }, "patterns": [ - { "include": "#item" } + { "include": "#item" }, + { "include": "#pickupFlag" } ] }, "item": { @@ -732,6 +733,10 @@ "3": { "name": "entity.name.function" } } }, + "pickupFlag": { + "match": "\\|mute\\b", + "name": "variable.other.enummember" + }, "comment": { "match": "//.*", "name": "comment" diff --git a/wasm/Cargo.toml b/wasm/Cargo.toml index 7491057..1b13097 100644 --- a/wasm/Cargo.toml +++ b/wasm/Cargo.toml @@ -9,7 +9,7 @@ publish = false crate-type = ["cdylib", "rlib"] [dependencies] -wotw_seedgen = "0.1.2" +wotw_seedgen = "0.2.0" wasm_bindgen_helper_macros = "0.0.2" wasm-bindgen = "0.2" js-sys = "0.3"