From 95cceda8ef5c721096b60f874c594e1f0b8b5abb Mon Sep 17 00:00:00 2001 From: benj Date: Sat, 11 Sep 2021 14:04:09 -0700 Subject: - rustic mode snippets - dap-mode rust lldb configuration - hl-todo-mode --- templates/snippets/rustic-mode/assert | 4 ++++ templates/snippets/rustic-mode/assert_eq | 5 +++++ templates/snippets/rustic-mode/derive_debug | 5 +++++ templates/snippets/rustic-mode/print_debug | 5 +++++ templates/snippets/rustic-mode/test | 8 ++++++++ 5 files changed, 27 insertions(+) create mode 100644 templates/snippets/rustic-mode/assert create mode 100644 templates/snippets/rustic-mode/assert_eq create mode 100644 templates/snippets/rustic-mode/derive_debug create mode 100644 templates/snippets/rustic-mode/print_debug create mode 100644 templates/snippets/rustic-mode/test (limited to 'templates/snippets/rustic-mode') 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); +} -- cgit v1.2.3