Skip to content

Commit

Permalink
Add snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
cooolbros committed Dec 14, 2024
1 parent 1f2fc66 commit 2479db0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"[json][jsonc]": {
"[json][jsonc][snippets]": {
"editor.insertSpaces": true,
"editor.tabSize": 4
},
"files.associations": {
"*.mdx": "markdown"
"*.mdx": "markdown",
"**/snippets/*.json": "snippets"
},
"files.exclude": {
"**/.DS_Store": true,
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,13 @@
"when": "resourceScheme == vpk && workspaceFolderCount > 0"
}
]
},
"snippets": [
{
"language": "vdf",
"path": "snippets/vdf.json"
}
]
},
"scripts": {
"vscode:prepublish": "pnpm build",
Expand Down
29 changes: 29 additions & 0 deletions snippets/vdf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"EditablePanel": {
"prefix": "panel",
"body": [
"\"$1\"",
"{",
"\t\"ControlName\"\t\t\"EditablePanel\"",
"\t\"fieldName\"\t\t\t\"$1\"",
"\t\"xpos\"\t\t\t\t\"$2\"",
"\t\"ypos\"\t\t\t\t\"$3\"",
"\t\"zpos\"\t\t\t\t\"$4\"",
"\t\"wide\"\t\t\t\t\"$5\"",
"\t\"tall\"\t\t\t\t\"$6\"",
"\t\"visible\"\t\t\t\"1\"",
"\t\"enabled\"\t\t\t\"1\"",
"\t\"bgcolor_override\"\t\"$7\"",
"}",
""
]
},
"pin_to_sibling": {
"prefix": "pin",
"body": [
"\"pin_to_sibling\"\t\t\t\"$1\"",
"\"pin_corner_to_sibling\"\t\t\"${2|PIN_TOPLEFT,PIN_TOPRIGHT,PIN_BOTTOMLEFT,PIN_BOTTOMRIGHT,PIN_CENTER_TOP,PIN_CENTER_RIGHT,PIN_CENTER_BOTTOM,PIN_CENTER_LEFT|}\"",
"\"pin_to_sibling_corner\"\t\t\"${3|PIN_TOPLEFT,PIN_TOPRIGHT,PIN_BOTTOMLEFT,PIN_BOTTOMRIGHT,PIN_CENTER_TOP,PIN_CENTER_RIGHT,PIN_CENTER_BOTTOM,PIN_CENTER_LEFT|}\""
]
}
}

0 comments on commit 2479db0

Please sign in to comment.