mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
feat(snippets): some changes
This commit is contained in:
parent
9b1a3b4b43
commit
cded48d484
5 changed files with 8 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# key: apiq
|
||||
# name: nest-api-query
|
||||
# condition: (string-match-p (rx controller.ts eos) (buffer-file-name))
|
||||
# condition: (string-match-p (rx "controller.ts" eos) (buffer-file-name))
|
||||
# --
|
||||
@ApiQuery({
|
||||
name: '$1',
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
# name: private-method
|
||||
# key: pm
|
||||
# --
|
||||
private $1 ($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
|
||||
private $1($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
|
||||
$0
|
||||
}
|
||||
4
.emacs.d/snippets/typescript-mode/private-service
Normal file
4
.emacs.d/snippets/typescript-mode/private-service
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# key: prs
|
||||
# name: private-service
|
||||
# --
|
||||
private ${1:service}Service: ${1:$(capitalize yas-text)}Service$0
|
||||
|
|
@ -2,6 +2,6 @@
|
|||
# name: public-async-method
|
||||
# key: pam
|
||||
# --
|
||||
public async $1 ($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
|
||||
public async $1($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
|
||||
$0
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# key: um
|
||||
# name: public-method
|
||||
# --
|
||||
public $1 ($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
|
||||
public $1($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
|
||||
$0
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue