Skip to content

Commit

Permalink
Preparing release 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert committed Jun 17, 2024
1 parent 3dd8093 commit 3247f5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "spright-vscode",
"displayName": "Spright Configuration Editor",
"description": "Editor for spright configurations",
"version": "1.2.1",
"version": "1.2.2",
"publisher": "houmain",
"author": {
"name": "Albert Kalchmair"
Expand Down Expand Up @@ -90,7 +90,7 @@
"spright.sprightVersion": {
"order": 1,
"type": "string",
"default": "3.4.0",
"default": "3.5.0",
"description": "Sets the Spright version the extension should use."
},
"spright.output": {
Expand Down
8 changes: 4 additions & 4 deletions src/CompletionItemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Definition = {
enumValues: EnumValue[];
};

function priorize(name: string): number | undefined {
function prioritize(name: string): number | undefined {
switch (name) {
case "sprite":
return 1;
Expand Down Expand Up @@ -91,18 +91,18 @@ export class SprightCompletionItemProvider {
console.log("Loading definitions failed: ", ex);
this.definitions = {};
}
this.definitionCompletions = this.createDefinitionCompeltions();
this.definitionCompletions = this.createDefinitionCompletions();
}

private createDefinitionCompeltions() {
private createDefinitionCompletions() {
const items: vscode.CompletionItem[] = [];
for (const name in this.definitions) {
const definition = this.definitions[name];
const c = new vscode.CompletionItem(name);
c.detail = "Arguments: " + definition.args;
c.documentation = parseDocumentation(definition.description);
c.kind = vscode.CompletionItemKind.Field;
const priority = priorize(name);
const priority = prioritize(name);
if (priority) {
c.sortText = priority.toString() + " " + name;
c.preselect = true;
Expand Down

0 comments on commit 3247f5d

Please sign in to comment.