diff options
| author | 2025-12-10 23:45:27 -0800 | |
|---|---|---|
| committer | 2025-12-10 23:45:27 -0800 | |
| commit | 1b561ab20379af8fd4a3b09cd3ab514858730e52 (patch) | |
| tree | b835f5b1db78415fa180d39b3332b2ec0f7b9c57 /oni-php | |
| parent | 00b9f8090f1a1bd66cf0db9b72afb9936f50284d (diff) | |
| download | emacs-config-1b561ab20379af8fd4a3b09cd3ab514858730e52.tar.gz emacs-config-1b561ab20379af8fd4a3b09cd3ab514858730e52.zip | |
oni-php: Add snippets
Diffstat (limited to 'oni-php')
| -rw-r--r-- | oni-php/snippets/php-mode/arrow-function | 4 | ||||
| -rw-r--r-- | oni-php/snippets/php-mode/function-expression | 7 | ||||
| -rw-r--r-- | oni-php/snippets/php-mode/function-statement | 10 | ||||
| -rw-r--r-- | oni-php/snippets/php-mode/if-statement | 7 |
4 files changed, 26 insertions, 2 deletions
diff --git a/oni-php/snippets/php-mode/arrow-function b/oni-php/snippets/php-mode/arrow-function index 43bad1e..53e0525 100644 --- a/oni-php/snippets/php-mode/arrow-function +++ b/oni-php/snippets/php-mode/arrow-function @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: arrow-function -# key: fn +# key: f # -- -fn($1) => $0
\ No newline at end of file +fn($1): $2 => $3
\ No newline at end of file diff --git a/oni-php/snippets/php-mode/function-expression b/oni-php/snippets/php-mode/function-expression new file mode 100644 index 0000000..5628e8e --- /dev/null +++ b/oni-php/snippets/php-mode/function-expression @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: function expression +# key: f +# -- +function ($1) ${2:use ($3)} { + $0 +}
\ No newline at end of file diff --git a/oni-php/snippets/php-mode/function-statement b/oni-php/snippets/php-mode/function-statement new file mode 100644 index 0000000..6a1cbe6 --- /dev/null +++ b/oni-php/snippets/php-mode/function-statement @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: function statement +# key: f +# -- +/** + * $5 + */ +${1:private} function $2($3): ${4:void} { + $0 +}
\ No newline at end of file diff --git a/oni-php/snippets/php-mode/if-statement b/oni-php/snippets/php-mode/if-statement new file mode 100644 index 0000000..6033e3a --- /dev/null +++ b/oni-php/snippets/php-mode/if-statement @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: if statement +# key: ? +# -- +if ($1) { + $2 +}
\ No newline at end of file |
