From 4c13b6434c12e716e2a3a9661c54441eefe21e40 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 11 Dec 2025 14:07:41 +0100 Subject: emacs: Remove some whitespace --- .config/emacs/modules/mm-humanwave.el | 2 -- 1 file changed, 2 deletions(-) (limited to '.config/emacs/modules/mm-humanwave.el') diff --git a/.config/emacs/modules/mm-humanwave.el b/.config/emacs/modules/mm-humanwave.el index 40bde27..c870eaf 100644 --- a/.config/emacs/modules/mm-humanwave.el +++ b/.config/emacs/modules/mm-humanwave.el @@ -79,7 +79,6 @@ If METHOD is nil, a GET request is performed." ;;; Insert Imports in Vue - (defun mm-humanwave-insert-vue-import-path (base-directory target-file) "Insert an import directive at POINT. The import directive imports TARGET-FILE relative from BASE-DIRECTORY. @@ -132,5 +131,4 @@ to the `project-find-file' command." (message "%s" path) path)))) - (provide 'mm-humanwave) -- cgit v1.2.3 From caccfb5897cbac934628426ba872028d3da89894 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 11 Dec 2025 14:08:42 +0100 Subject: emacs: Improve Vue component imports --- .config/emacs/modules/mm-humanwave.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.config/emacs/modules/mm-humanwave.el') diff --git a/.config/emacs/modules/mm-humanwave.el b/.config/emacs/modules/mm-humanwave.el index c870eaf..3aa97b3 100644 --- a/.config/emacs/modules/mm-humanwave.el +++ b/.config/emacs/modules/mm-humanwave.el @@ -94,8 +94,15 @@ behaviour of the INCLUDE-ALL-P argument to `mm-project-read-file-name'." (mm-humanwave-project-read-file-name current-prefix-arg))) (let ((path (file-name-sans-extension (file-relative-name target-file base-directory)))) + (unless (string-match-p "/" path) + (setq path (concat "./" path))) (insert "import ") (save-excursion + (insert (thread-last + (file-name-base path) + (mm-string-split "-") + (mapconcat #'capitalize))) + (push-mark (point)) (insert (format " from '%s';" path))))) (defun mm-humanwave-project-read-file-name (&optional include-all-p) -- cgit v1.2.3