Files
godot-vscode-plugin/configrations/snippets.json
Geequlim 815a80dfed Add actions to run project and scenes
Fix errors with validating
Add node completion
2016-12-27 21:31:00 +08:00

196 lines
3.4 KiB
JSON

{
// Place your snippets for JavaScript React here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Subclass": {
"prefix": "class",
"body": [
"class '$1' extends ${2:Reference}",
"\t$3"
]
},
"Print messages to console": {
"prefix": "pr",
"body": [
"print($1)"
]
},
"_ready method of Node": {
"prefix": "ready",
"body": [
"func _ready():",
"\t${1:pass}"
]
},
"_init method of Object": {
"prefix": "init",
"body": [
"func _init():",
"\t${1:pass}"
]
},
"_process method of Node": {
"prefix": "process",
"body": [
"func _process(delta):",
"\t${1:pass}"
]
},
"_input method of Node": {
"prefix": "input",
"body": [
"func _input(event):",
"\t${1:pass}"
]
},
"_input_event method of Node": {
"prefix": "inpute",
"body": [
"func _input_event(event):",
"\t${1:pass}"
]
},
"for loop": {
"prefix": "for",
"body": [
"for $1 in $2:",
"\t${3:pass}"
]
},
"for range loop": {
"prefix": "for",
"body": [
"for $1 in range(${2:start}{$3:,end}):",
"\t${4:pass}"
]
},
"if elif else": {
"prefix": "if",
"body": [
"if ${1:condition}:",
"\t${3:pass}",
"elif ${2:condition}:",
"\t${4:pass}",
"else:",
"\t${5:pass}"
]
},
"if else": {
"prefix": "if",
"body": [
"if ${1:condition}:",
"\t${2:pass}",
"else:",
"\t${3:pass}"
]
},
"if": {
"prefix": "if",
"body": [
"if ${1:condition}:",
"\t${2:pass}"
]
},
"while": {
"prefix": "while",
"body": [
"while ${1:condition}:",
"\t${2:pass}"
]
},
"function define": {
"prefix": "func",
"body": [
"func ${1:method}(${2:args}):",
"\t${3:pass}"
]
},
"signal decleration": {
"prefix": "signal",
"body": [
"signal ${1:signalname}(${2:args})"
]
},
"export variables": {
"prefix": "export",
"body": [
"export(${1:type}${2:,other_configs}) var ${3:name}${4: = default}${5: setget }"
]
},
"define variables": {
"prefix": "var",
"body": [
"var ${1:name}${2: = default}${3: setget }"
]
},
"define onready variables": {
"prefix": "onready",
"body": [
"onready var ${1:name}${2: = default}${3: setget }"
]
},
"Is instance of a class": {
"prefix": "extends",
"body": [
"${1:instance} extends ${2:class_name}"
]
},
"element in array": {
"prefix": "in",
"body": [
"${1:element} in ${$2:array}"
]
},
"GDScript template": {
"prefix": "gdscript",
"body": [
"extends ${1:BaseClass}",
"",
"# class member variables go here, for example:",
"# var a = 2",
"# var b = \"textvar\"",
"",
"func _ready():",
"\t# Called every time the node is added to the scene.",
"\t# Initialization here",
"\tpass",
""
]
},
"Enable process function": {
"prefix": "process",
"body": [
"set_process(true)"
]
},
"Enable process input function": {
"prefix": "processin",
"body": [
"set_process_input(true)"
]
}
}