[Emacs] Add new Rust snippets, common-lisp layer
This commit adds two new snippets for Rust, one for an easier way to write a `println' macro than the default one, and another one for writing more easily new `new' functions for Rust structs. It also adds the `common-lisp' layer in Emacs so I can test StumpWM.
This commit is contained in:
10
.config/emacs/private/snippets/rust-mode/new
Normal file
10
.config/emacs/private/snippets/rust-mode/new
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: new
|
||||
# key: _new
|
||||
# --
|
||||
fn new(${1:args}) -> Self {
|
||||
$0
|
||||
Self {
|
||||
${1:$(phundrak/yas-rust-new-assignments yas-text)}
|
||||
}
|
||||
}
|
||||
5
.config/emacs/private/snippets/rust-mode/println
Normal file
5
.config/emacs/private/snippets/rust-mode/println
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: println!("{}", value);
|
||||
# key: pln
|
||||
# --
|
||||
println!("${1:{}}", $2);
|
||||
Reference in New Issue
Block a user