Skip to content

Commit c32f4af

Browse files
committed
Add auto completions for scaffolds.
1 parent 7925117 commit c32f4af

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openwebwork/codemirror-lang-pg",
3-
"version": "0.0.1-beta.13",
3+
"version": "0.0.1-beta.14",
44
"description": "PG language support for CodeMirror",
55
"author": "The WeBWorK Project",
66
"license": "MIT",

src/pg-parser.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,19 @@ export const pgCompletion = (isTop = false) => {
107107
);
108108
}
109109
}
110+
111+
for (const part of ['Scaffold', 'Section']) {
112+
for (const position of ['Begin', 'End']) {
113+
completionOptions.push(
114+
snippetCompletion(`${part}::${position}(\${});\${}`, {
115+
label: `${part}::${position}`,
116+
info: `${part}::${position}();`,
117+
type: 'variable',
118+
section: { name: 'PG Methods' }
119+
})
120+
);
121+
}
122+
}
110123
}
111124

112125
return completeFromList(completionOptions)(context);

0 commit comments

Comments
 (0)