config/default: :compile => :make; improve :make

doom:make now performs file modifier substitution, e.g. %:p:h.
This commit is contained in:
Henrik Lissner 2018-03-14 19:44:57 -04:00
parent 692472b6bf
commit 9961df061e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -17,9 +17,10 @@
(kill-new default-directory) (kill-new default-directory)
(message "Copied to clipboard"))) (message "Copied to clipboard")))
(evil-define-command doom:compile (command &optional bang) (evil-define-command doom:make (command &optional from-pwd)
(interactive "<a><!>") (interactive "<sh><!>")
(let ((default-directory (if bang (doom-project-root t) default-directory))) (let ((default-directory (if from-pwd default-directory (doom-project-root t)))
(command (and command (evil-ex-replace-special-filenames command))))
(compile command))) (compile command)))
@ -95,7 +96,7 @@
(ex! "sw[oop]" #'+helm:swoop) (ex! "sw[oop]" #'+helm:swoop)
(ex! "todo" #'+helm:todo))) (ex! "todo" #'+helm:todo)))
;; Project tools ;; Project tools
(ex! "compile" #'doom:compile) (ex! "mak[e]" #'doom:make)
(ex! "debug" #'+debug/run) (ex! "debug" #'+debug/run)
(ex! "er[rors]" #'flycheck-list-errors) (ex! "er[rors]" #'flycheck-list-errors)
;; File operations ;; File operations