Skip to content

Commit

Permalink
Add auto completions for scaffolds.
Browse files Browse the repository at this point in the history
  • Loading branch information
drgrice1 committed Nov 17, 2024
1 parent 7925117 commit c32f4af
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 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 number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openwebwork/codemirror-lang-pg",
"version": "0.0.1-beta.13",
"version": "0.0.1-beta.14",
"description": "PG language support for CodeMirror",
"author": "The WeBWorK Project",
"license": "MIT",
Expand Down
13 changes: 13 additions & 0 deletions src/pg-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ export const pgCompletion = (isTop = false) => {
);
}
}

for (const part of ['Scaffold', 'Section']) {
for (const position of ['Begin', 'End']) {
completionOptions.push(
snippetCompletion(`${part}::${position}(\${});\${}`, {
label: `${part}::${position}`,
info: `${part}::${position}();`,
type: 'variable',
section: { name: 'PG Methods' }
})
);
}
}
}

return completeFromList(completionOptions)(context);
Expand Down

0 comments on commit c32f4af

Please sign in to comment.