diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2025-12-11 19:50:33 +0100 |
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2025-12-11 19:50:33 +0100 |
| commit | e89cab0aae8bc79270a79fe23edad09e43ba823b (patch) | |
| tree | cc13943e1d843fa8d92a0a936a9493036849c1a7 /.config/emacs/modules/mm-humanwave.el | |
| parent | b978f0d12c54e2754bea6463f072513838474bc7 (diff) | |
| parent | dad93f009a27699ffc58c7949cd826d3c1487136 (diff) | |
Merge branch 'master' of github.com:Mango0x45/dotfiles
Diffstat (limited to '.config/emacs/modules/mm-humanwave.el')
| -rw-r--r-- | .config/emacs/modules/mm-humanwave.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/.config/emacs/modules/mm-humanwave.el b/.config/emacs/modules/mm-humanwave.el index 40bde27..3aa97b3 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. @@ -95,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) @@ -132,5 +138,4 @@ to the `project-find-file' command." (message "%s" path) path)))) - (provide 'mm-humanwave) |