Commit a8646118e549
Changed files (18)
etc
yasnippet
etc/yasnippet/snippets/js-mode/commonjs.require
@@ -0,0 +1,5 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: commonjs.require
+# key: req
+# --
+var ${3:${1:$(s-lower-camel-case (file-name-nondirectory yas/text))}} = require("${1:module}")$2;$0
\ No newline at end of file
etc/yasnippet/snippets/js-mode/es6.import
@@ -0,0 +1,6 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: es6.import
+# key: imp
+# binding: direct-keybinding
+# --
+import ${3:${1:$(s-lower-camel-case (file-name-nondirectory yas/text))}} from "${1:module}";$0
\ No newline at end of file
etc/yasnippet/snippets/js-mode/js.es5exportedfunction
@@ -0,0 +1,6 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: js.exportedfunction
+# key: 5xf
+# --
+function $1($2) {$0};
+module.exports.$1 = $1;
etc/yasnippet/snippets/js-mode/js.exportedconst
@@ -0,0 +1,5 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: js.exportedconst
+# key: xc
+# --
+export const $1 = $0;
etc/yasnippet/snippets/js-mode/js.exportedfunction
@@ -0,0 +1,7 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: js.exportedfunction
+# key: xf
+# --
+export function ${1:f}($2) {
+ $0
+}
etc/yasnippet/snippets/js-mode/js.exportedvar
@@ -0,0 +1,5 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: js.exportedvar
+# key: xv
+# --
+var $1 = module.exports.$1 = $0;
etc/yasnippet/snippets/js-mode/js.function
@@ -0,0 +1,5 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: js.function
+# key: fn
+# --
+function($1) {$0}
\ No newline at end of file
etc/yasnippet/snippets/js-mode/js.generator
@@ -0,0 +1,5 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: js.generator
+# key: gen
+# --
+function*() {$0}
\ No newline at end of file
etc/yasnippet/snippets/js-mode/jsdoc
@@ -0,0 +1,7 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: jsdoc
+# key: jd
+# --
+/**
+ * $0
+ */
\ No newline at end of file
etc/yasnippet/snippets/rust-mode/clone
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: clone
+# key: clone
+# --
+clone(&self) -> Self {
+ $0
+}
\ No newline at end of file
etc/yasnippet/snippets/rust-mode/default
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: default
+# key: default
+# --
+default() -> Self {
+ ${0:Self::new()}
+}
\ No newline at end of file
etc/yasnippet/snippets/rust-mode/fmt
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: fmt
+# key: fmt
+# --
+fmt(&self, f: &mut Formatter) -> Result<(), Error> {
+ $0
+}
\ No newline at end of file
etc/yasnippet/snippets/rust-mode/impl
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: impl
+# key: impl
+# --
+impl$3 ${1:Trait} for ${2:Type}$3 {
+ $0
+}
\ No newline at end of file
etc/yasnippet/snippets/rust-mode/implClone
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: implClone
+# key: Clone
+# --
+impl$2 Clone for ${1:Type}$2 {
+ fn clone(&self) -> Self {
+ $0
+ }
+}
\ No newline at end of file
etc/yasnippet/snippets/rust-mode/implDefault
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: implDefault
+# key: Default
+# --
+impl$2 Default for ${1:Type}$2 {
+ fn default() -> Self {
+ ${0:Self::new()}
+ }
+}
\ No newline at end of file
etc/yasnippet/snippets/rust-mode/is_empty
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: is_empty
+# key: is_empty
+# --
+is_empty(&self) -> bool {
+ ${0:self.len() == 0}
+}
\ No newline at end of file
etc/yasnippet/snippets/rust-mode/len
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: len
+# key: len
+# --
+len(&self) -> usize {
+ $0
+}
\ No newline at end of file
etc/yasnippet/snippets/rust-mode/new
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: new
+# key: new
+# --
+new() -> Self {
+ $0
+}
\ No newline at end of file