branch: elpa/yasnippet-snippets
commit 6fafad13bb4689600285d9e38c61958dd63c356d
Author: xiliuya <67564860+xili...@users.noreply.github.com>
Commit: GitHub <nore...@github.com>

    add some snippet (#469)
---
 snippets/gdscript-mode/class       | 7 +++++++
 snippets/gdscript-mode/class_name  | 6 ++++++
 snippets/gdscript-mode/const       | 6 ++++++
 snippets/gdscript-mode/enum        | 6 ++++++
 snippets/gdscript-mode/for         | 7 +++++++
 snippets/gdscript-mode/func        | 7 +++++++
 snippets/gdscript-mode/if          | 7 +++++++
 snippets/gdscript-mode/ife         | 9 +++++++++
 snippets/gdscript-mode/match       | 8 ++++++++
 snippets/gdscript-mode/onready     | 6 ++++++
 snippets/gdscript-mode/print       | 5 +++++
 snippets/gdscript-mode/return      | 5 +++++
 snippets/gdscript-mode/setget      | 6 ++++++
 snippets/gdscript-mode/static_func | 7 +++++++
 snippets/gdscript-mode/var         | 6 ++++++
 snippets/gdscript-mode/while       | 7 +++++++
 16 files changed, 105 insertions(+)

diff --git a/snippets/gdscript-mode/class b/snippets/gdscript-mode/class
new file mode 100644
index 0000000000..f857cdbd4b
--- /dev/null
+++ b/snippets/gdscript-mode/class
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: class
+# key: cls
+# group: object oriented
+# --
+class ${1:class}:
+    $0
diff --git a/snippets/gdscript-mode/class_name 
b/snippets/gdscript-mode/class_name
new file mode 100644
index 0000000000..bfc9e184c5
--- /dev/null
+++ b/snippets/gdscript-mode/class_name
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: class_name
+# key: clsn
+# group: object oriented
+# --
+class_name ${1:Item} = ${2:"res://icons/item.png"}
\ No newline at end of file
diff --git a/snippets/gdscript-mode/const b/snippets/gdscript-mode/const
new file mode 100644
index 0000000000..47374c80f2
--- /dev/null
+++ b/snippets/gdscript-mode/const
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: const
+# key: const
+# group: definitions
+# --
+const ${1:name} = $0
\ No newline at end of file
diff --git a/snippets/gdscript-mode/enum b/snippets/gdscript-mode/enum
new file mode 100644
index 0000000000..0f2cae1cf3
--- /dev/null
+++ b/snippets/gdscript-mode/enum
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: enum
+# key: enum
+# group: definitions
+# --
+enum $1 {$2}
\ No newline at end of file
diff --git a/snippets/gdscript-mode/for b/snippets/gdscript-mode/for
new file mode 100644
index 0000000000..30cdf7ca67
--- /dev/null
+++ b/snippets/gdscript-mode/for
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: for ... in ... : ...
+# key: for
+# group : control structure
+# --
+for ${var} in ${collection}:
+    ${0:pass}
\ No newline at end of file
diff --git a/snippets/gdscript-mode/func b/snippets/gdscript-mode/func
new file mode 100644
index 0000000000..dd666604a2
--- /dev/null
+++ b/snippets/gdscript-mode/func
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: func
+# key: f
+# group: definitions
+# --
+func ${1:func_name} (${2:param}):
+    ${0:pass}
\ No newline at end of file
diff --git a/snippets/gdscript-mode/if b/snippets/gdscript-mode/if
new file mode 100644
index 0000000000..72bf23b239
--- /dev/null
+++ b/snippets/gdscript-mode/if
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: if
+# key: if
+# group : control structure
+# --
+if ${1:condition}:
+    ${0:pass}
\ No newline at end of file
diff --git a/snippets/gdscript-mode/ife b/snippets/gdscript-mode/ife
new file mode 100644
index 0000000000..767d9c493f
--- /dev/null
+++ b/snippets/gdscript-mode/ife
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: ife
+# key: ife
+# group : control structure
+# --
+if ${1:condition}:
+    ${2:pass}
+else:
+    ${3:pass}
\ No newline at end of file
diff --git a/snippets/gdscript-mode/match b/snippets/gdscript-mode/match
new file mode 100644
index 0000000000..f4ca09ea10
--- /dev/null
+++ b/snippets/gdscript-mode/match
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: match
+# key: match
+# group: control structure
+# --
+match ${1:expression}:
+    ${2:pattern}:
+        ${3:pass}
\ No newline at end of file
diff --git a/snippets/gdscript-mode/onready b/snippets/gdscript-mode/onready
new file mode 100644
index 0000000000..ed381d29e0
--- /dev/null
+++ b/snippets/gdscript-mode/onready
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: onready
+# key: onr
+# group: definitions
+# --
+onready var ${1:name} = $0
\ No newline at end of file
diff --git a/snippets/gdscript-mode/print b/snippets/gdscript-mode/print
new file mode 100644
index 0000000000..cc1c797e4f
--- /dev/null
+++ b/snippets/gdscript-mode/print
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: print
+# key: p
+# --
+print($0)
\ No newline at end of file
diff --git a/snippets/gdscript-mode/return b/snippets/gdscript-mode/return
new file mode 100644
index 0000000000..641a308a32
--- /dev/null
+++ b/snippets/gdscript-mode/return
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: return
+# key: r
+# --
+return $0
\ No newline at end of file
diff --git a/snippets/gdscript-mode/setget b/snippets/gdscript-mode/setget
new file mode 100644
index 0000000000..457a5faccb
--- /dev/null
+++ b/snippets/gdscript-mode/setget
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: setget
+# key: vsg
+# group: definitions
+# --
+var ${1:variable} = ${2:value} setget ${3:setterfunc}, ${4:getterfunc}
\ No newline at end of file
diff --git a/snippets/gdscript-mode/static_func 
b/snippets/gdscript-mode/static_func
new file mode 100644
index 0000000000..e45a5bb043
--- /dev/null
+++ b/snippets/gdscript-mode/static_func
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: static_func
+# key: sf
+# group: definitions
+# --
+static func ${1:func_name} (${2:param}):
+    ${0:pass}
\ No newline at end of file
diff --git a/snippets/gdscript-mode/var b/snippets/gdscript-mode/var
new file mode 100644
index 0000000000..648ed11b93
--- /dev/null
+++ b/snippets/gdscript-mode/var
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: var
+# key: var
+# group: definitions
+# --
+var ${1:name} = $0
\ No newline at end of file
diff --git a/snippets/gdscript-mode/while b/snippets/gdscript-mode/while
new file mode 100644
index 0000000000..ae9e9ccc69
--- /dev/null
+++ b/snippets/gdscript-mode/while
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: while
+# key: wh
+# group: control structure
+# --
+while ${1:True}:
+    ${0:pass}
\ No newline at end of file

Reply via email to