Skip to content

Commit

Permalink
support mute after non-message pickups
Browse files Browse the repository at this point in the history
  • Loading branch information
SiriusAshling committed Oct 18, 2022
1 parent c3c6172 commit 076adc3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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}"`);
Expand Down
3 changes: 3 additions & 0 deletions src/pickupFlag.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export enum PickupFlagVariant {
mute,
}
7 changes: 6 additions & 1 deletion syntaxes/ori-wotw-header.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"2": { "name": "keyword.control" }
},
"patterns": [
{ "include": "#item" }
{ "include": "#item" },
{ "include": "#pickupFlag" }
]
},
"item": {
Expand Down Expand Up @@ -732,6 +733,10 @@
"3": { "name": "entity.name.function" }
}
},
"pickupFlag": {
"match": "\\|mute\\b",
"name": "variable.other.enummember"
},
"comment": {
"match": "//.*",
"name": "comment"
Expand Down
2 changes: 1 addition & 1 deletion wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 076adc3

Please sign in to comment.