From ee14f070df766bddd8710124dbcfc2737422882d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 18 Oct 2017 12:35:11 +0200 Subject: Emacs: Add npm-yarn aliases --- emacs/.emacs.d/main.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'emacs') diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index d138d976..80ff2d5a 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -494,6 +494,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 +503,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 +512,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 +521,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 +531,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: ") -- cgit 1.4.1 From 51fc99f1e180a30c2a7bc21517b41009fbb72f3f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 18 Oct 2017 12:35:31 +0200 Subject: Emacs: Fix flycheck setup in js2-mode --- emacs/.emacs.d/main.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'emacs') diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index 80ff2d5a..b4ddd664 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -2092,13 +2092,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 -- cgit 1.4.1 From 75c5e4df2e02756caded5047806d5e7794eea3bb Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 18 Oct 2017 12:35:45 +0200 Subject: Emacs: Change mu4e shortcuts --- emacs/.emacs.d/main.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'emacs') diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index b4ddd664..7508dd0f 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -1279,10 +1279,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" @@ -1297,7 +1297,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 @@ -1313,7 +1313,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 -- cgit 1.4.1 From 0a297c13575bcc98c037219017da3a2695a33eee Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 18 Oct 2017 12:35:52 +0200 Subject: Emacs: Add use-fixed-fonts function Counterpart to use-variable fonts --- emacs/.emacs.d/main.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'emacs') diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index 7508dd0f..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)) -- cgit 1.4.1