summary refs log tree commit diff stats
path: root/emacs/.emacs.d/main.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/main.el')
-rw-r--r--emacs/.emacs.d/main.el25
1 files changed, 18 insertions, 7 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index d138d976..1b30808f 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -172,6 +172,11 @@
     (variable-pitch-mode)
     (setq cursor-type '(bar . 1)))
 
+  (defun use-fixed-fonts ()
+    (interactive)
+    (variable-pitch-mode -1)
+    (setq cursor-type 'box))
+
   (defun ap/set-fonts (mono-face mono-font-size variable-face variable-font-size antialias &optional new-line-spacing)
     (if (boundp 'ns-antialias-text)
         (setq ns-antialias-text antialias))
@@ -494,6 +499,7 @@
                  ((string-equal (projectile-project-type) "node-yarn")
                   (cmd-to-echo "yarn" "install"))
                  (t (cmd-to-echo "npm" "install")))))
+            (defalias 'npm-install #'yarn-install)
 
             (defun yarn-add-dev (package)
               (interactive "spackage: ")
@@ -502,6 +508,7 @@
                  ((string-equal (projectile-project-type) "node-yarn")
                   (cmd-to-echo "yarn" (concat "add --dev " package)))
                  (t (cmd-to-echo "npm" (concat "install --save-dev " package))))))
+            (defalias 'npm-save-dev #'yarn-add-dev)
 
             (defun yarn-add (package)
               (interactive "spackage: ")
@@ -510,6 +517,7 @@
                  ((string-equal (projectile-project-type) "node-yarn")
                   (cmd-to-echo "yarn" (concat "add " package)))
                  (t (cmd-to-echo "npm" (concat "install --save " package))))))
+            (defalias 'npm-save #'yarn-add)
 
             (defun yarn-remove (package)
               (interactive "spackage: ")
@@ -518,6 +526,7 @@
                  ((string-equal (projectile-project-type) "node-yarn")
                   (cmd-to-echo "yarn" (concat "remove " package)))
                  (t (cmd-to-echo "npm" (concat "remove " package))))))
+            (defalias 'npm-remote #'yarn-remove)
 
             (defun yarn-run (cmd)
               (interactive (list
@@ -527,6 +536,7 @@
                  ((string-equal (projectile-project-type) "node-yarn")
                   (cmd-to-echo "yarn" (concat "run " cmd)))
                  (t (cmd-to-echo "npm" (concat "run " cmd))))))
+            (defalias 'npm-run #'yarn-run)
 
             (defun npx-run (cmd)
               (interactive "scommand: ")
@@ -1274,10 +1284,10 @@ With two prefix arguments, write out the day and month name."
                               (mu4e-refile-folder . "/personal/alanpearce/Archive")
                               (mu4e-trash-folder . "/personal/alanpearce/Trash")
                               (mu4e-maildir-shortcuts . (("/personal/alanpearce/INBOX" . ?i)
-                                                         ("/personal/alanpearce/Archive" . ?s)
+                                                         ("/personal/alanpearce/Archive" . ?a)
                                                          ("/personal/alanpearce/Sent" . ?s)
                                                          ("/personal/alanpearce/Spam" . ?p)
-                                                         ("/personal/alanpearce/Orders" . ?o)))
+                                                         ("/personal/alanpearce/Orders" . ?r)))
                               ))
                      (make-mu4e-context
                       :name "Riseup"
@@ -1292,7 +1302,7 @@ With two prefix arguments, write out the day and month name."
                               (mu4e-refile-folder . "/personal/riseup/Archive")
                               (mu4e-trash-folder . "/personal/riseup/Trash")
                               (mu4e-maildir-shortcuts . (("/personal/riseup/INBOX" . ?i)
-                                                         ("/personal/riseup/Archive" . ?r)
+                                                         ("/personal/riseup/Archive" . ?a)
                                                          ("/personal/riseup/Sent" . ?s)
                                                          ("/personal/riseup/Spam" . ?p)))))
                      (make-mu4e-context
@@ -1308,7 +1318,7 @@ With two prefix arguments, write out the day and month name."
                               (mu4e-refile-folder . "/satoshipay/[Gmail]/.All Mail")
                               (mu4e-trash-folder .  "/satoshipay/[Gmail]/.Bin")
                               (mu4e-maildir-shortcuts . (("/satoshipay/INBOX" . ?i)
-                                                         ("/satoshipay/[Gmail]/.All Mail" . ?r)
+                                                         ("/satoshipay/[Gmail]/.All Mail" . ?a)
                                                          ("/satoshipay/[Gmail]/.Sent Mail" . ?s)
                                                          ("/satoshipay/[Gmail]/.Spam" . ?p))))))
                     mu4e-user-mail-address-list (append
@@ -2087,13 +2097,14 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer."
 (use-package add-node-modules-path
   :config (progn
             (define-hook-helper js2-mode ()
+              :name node-modules-flycheck
               (add-node-modules-path)
               (when (executable-find "eslint")
-                (setq flycheck-javascript-eslint-executable "eslint"))
+                (setq-local flycheck-javascript-eslint-executable (executable-find "eslint")))
               (when (executable-find "prettier-standard")
-                (setq flycheck-javascript-standard-executable "prettier-standard"))
+                (setq-local flycheck-javascript-standard-executable (executable-find "prettier-standard")))
               (when (executable-find "standard")
-                (setq flycheck-javascript-standard-executable "standard")))))
+                (setq-local flycheck-javascript-standard-executable (executable-find "standard"))))))
 
 ;;;;;;; Flow