summaryrefslogtreecommitdiff
path: root/templates/snippets/rustic-mode
diff options
context:
space:
mode:
authorbenj <benj@rse8.com>2021-09-11 14:04:09 -0700
committerbenj <benj@rse8.com>2021-09-11 14:04:09 -0700
commit95cceda8ef5c721096b60f874c594e1f0b8b5abb (patch)
treedb4ec60959ca2d954d00ab0f8c631417805f445a /templates/snippets/rustic-mode
parent518baa4296035df24d4271a4d188af5db3bd52f7 (diff)
downloademacs-95cceda8ef5c721096b60f874c594e1f0b8b5abb.tar
emacs-95cceda8ef5c721096b60f874c594e1f0b8b5abb.tar.gz
emacs-95cceda8ef5c721096b60f874c594e1f0b8b5abb.tar.bz2
emacs-95cceda8ef5c721096b60f874c594e1f0b8b5abb.tar.lz
emacs-95cceda8ef5c721096b60f874c594e1f0b8b5abb.tar.xz
emacs-95cceda8ef5c721096b60f874c594e1f0b8b5abb.tar.zst
emacs-95cceda8ef5c721096b60f874c594e1f0b8b5abb.zip
- rustic mode snippets
- dap-mode rust lldb configuration - hl-todo-mode
Diffstat (limited to 'templates/snippets/rustic-mode')
-rw-r--r--templates/snippets/rustic-mode/assert4
-rw-r--r--templates/snippets/rustic-mode/assert_eq5
-rw-r--r--templates/snippets/rustic-mode/derive_debug5
-rw-r--r--templates/snippets/rustic-mode/print_debug5
-rw-r--r--templates/snippets/rustic-mode/test8
5 files changed, 27 insertions, 0 deletions
diff --git a/templates/snippets/rustic-mode/assert b/templates/snippets/rustic-mode/assert
new file mode 100644
index 0000000..4d823f3
--- /dev/null
+++ b/templates/snippets/rustic-mode/assert
@@ -0,0 +1,4 @@
+me : assert
+#key : as
+# --
+assert!(${1:truth});
diff --git a/templates/snippets/rustic-mode/assert_eq b/templates/snippets/rustic-mode/assert_eq
new file mode 100644
index 0000000..18e9e8b
--- /dev/null
+++ b/templates/snippets/rustic-mode/assert_eq
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+#name : assert_eq
+#key : ase
+# --
+assert_eq!(${1:a}, ${2:b});
diff --git a/templates/snippets/rustic-mode/derive_debug b/templates/snippets/rustic-mode/derive_debug
new file mode 100644
index 0000000..6d64312
--- /dev/null
+++ b/templates/snippets/rustic-mode/derive_debug
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: derive-debug
+# key: debug
+# --
+#[derive(Debug)]
diff --git a/templates/snippets/rustic-mode/print_debug b/templates/snippets/rustic-mode/print_debug
new file mode 100644
index 0000000..5ae259f
--- /dev/null
+++ b/templates/snippets/rustic-mode/print_debug
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: println!("{:#?}", value);
+# key: log
+# --
+println!("{:#?}", ${1:value});
diff --git a/templates/snippets/rustic-mode/test b/templates/snippets/rustic-mode/test
new file mode 100644
index 0000000..837276f
--- /dev/null
+++ b/templates/snippets/rustic-mode/test
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: test
+# key: test
+# --
+#[test]
+fn it_works() {
+ assert_eq!(2 + 2, 4);
+}