Skip to content

Commit

Permalink
Tools - Add function header snippet (#10682)
Browse files Browse the repository at this point in the history
Co-authored-by: PabstMirror <[email protected]>
  • Loading branch information
Timi007 and PabstMirror authored Feb 6, 2025
1 parent 62d5f22 commit a8eacf4
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
*.zip
release/*
releases/*
.vscode/*
hemtt
hemtt.exe
.hemttout
Expand Down
File renamed without changes.
40 changes: 40 additions & 0 deletions .vscode/sqf.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"SQF Function Header": {
"description": "SQF function header",
"prefix": "header",
"body": [
"#include \"..\\script_component.hpp\"",
"/*",
" * Author: ${1:Author}",
" * ${2:Description}",
" *",
" * Arguments:",
" * ${8:0: ${9:Description} <${10|OBJECT,NUMBER,STRING,BOOL,ARRAY,CONTROL,DISPLAY,CONFIG,CODE,ANY,LOGIC,SIDE,GROUP,HASHMAP,NAMESPACE,LOCATION,TEXT|}>}$0",
" *",
" * Return Value:",
" * ${4:${5:Description} <${6|OBJECT,NUMBER,STRING,BOOL,ARRAY,CONTROL,DISPLAY,CONFIG,CODE,ANY,LOGIC,SIDE,GROUP,HASHMAP,NAMESPACE,LOCATION,TEXT|}>}",
" *",
" * Example:",
" * [$7] call ace_${TM_DIRECTORY/(.*)addons\\\\(.*)\\\\functions(.*)/$2/}_${TM_FILENAME_BASE}",
" *",
" * Public: ${3|No,Yes|}",
" */",
"",
""
],
},
"SQF Function Header Argument": {
"description": "SQF function header argument",
"prefix": "header_argument",
"body": [
"* ${1:1}: ${2:Description} <${3|OBJECT,NUMBER,STRING,BOOL,ARRAY,CONTROL,DISPLAY,CONFIG,CODE,ANY,LOGIC,SIDE,GROUP,HASHMAP,NAMESPACE,LOCATION,TEXT|}>",
],
},
"SQF Function Header Return Value": {
"description": "SQF function header return value",
"prefix": "header_return",
"body": [
"* ${1:Description} <${2|OBJECT,NUMBER,STRING,BOOL,ARRAY,CONTROL,DISPLAY,CONFIG,CODE,ANY,LOGIC,SIDE,GROUP,HASHMAP,NAMESPACE,LOCATION,TEXT|}>",
],
},
}
1 change: 0 additions & 1 deletion tools/.vscode/tasks.json → .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"Validate Stringtables",
"Validate headers",
"Check Strings",
"SQFVM Checker",
"HEMTT check"
],
"group": {
Expand Down

0 comments on commit a8eacf4

Please sign in to comment.