From 233c57fc89be6ea3ef14a91d7fbb3e498ab76673 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 30 Dec 2024 11:26:11 -0800 Subject: [PATCH] Add snippet to add the namespace to a file --- oni-php/snippets/php-mode/namespace | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 oni-php/snippets/php-mode/namespace diff --git a/oni-php/snippets/php-mode/namespace b/oni-php/snippets/php-mode/namespace new file mode 100644 index 0000000..a63d713 --- /dev/null +++ b/oni-php/snippets/php-mode/namespace @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: namespace +# key: ns +# -- +namespace ${1:`(string-join (mapcar #'capitalize (cdr (split-string (directory-file-name (file-name-directory (file-relative-name buffer-file-name (project-root (project-current))))) "/"))) "\\")`}; \ No newline at end of file