From e508620ec8849bb297eecc5afe027a8a856b865a Mon Sep 17 00:00:00 2001 From: petrucci4prez Date: Tue, 3 Jul 2018 19:48:50 -0400 Subject: [PATCH] add rainbow, haskell, and some ui tweaks --- conf.el | 27 ++++++++++++++++++++------- conf.org | 34 +++++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/conf.el b/conf.el index 20f7c46..1ab079e 100644 --- a/conf.el +++ b/conf.el @@ -23,8 +23,6 @@ (add-hook 'inferior-ess-mode-hook #'prettify-symbols-mode) (add-hook 'prog-mode-hook #'prettify-symbols-mode) -(when window-system (global-hl-line-mode t)) - (defalias 'yes-or-no-p 'y-or-n-p) ; eliminate yes or no prompt on killing procs (defvar my:theme 'spacemacs-dark) @@ -69,6 +67,8 @@ (global-set-key (kbd "") 'org-agenda) (global-set-key (kbd "") 'org-capture) +(global-set-key (kbd "") 'global-hl-line-mode) +(global-set-key (kbd "S-") 'display-line-numbers-mode) (use-package delight :ensure t) @@ -174,6 +174,10 @@ (setq fci-rule-use-dashes t) (add-hook 'prog-mode-hook #'fci-mode)) +(use-package rainbow-mode + :ensure t + :init) + ;; lovingly stolen from aaron harris (defmacro nd/with-advice (adlist &rest body) "Execute BODY with temporary advice in ADLIST. @@ -270,6 +274,13 @@ event of an error or nonlocal exit." (setq ess-history-directory (substitute-in-file-name "${XDG_CONFIG_HOME}/r/")) +(use-package haskell-mode + :ensure t + :config + ;; enable dynamic linking by default + (setq haskell-compile-command "ghc -dynamic -Wall -ferror-spans -fforce-recomp -c %s") + (setq haskell-interactive-popup-errors nil)) + (setq org-startup-indented t) (delight 'org-indent-mode) (setq org-directory "~/Org") @@ -469,12 +480,14 @@ event of an error or nonlocal exit." (not (member (nth 2 (org-heading-components)) org-done-keywords))) (setq org-refile-target-verify-function 'nd/verify-refile-target) -(setq org-habit-graph-column 50) +;; (setq org-habit-graph-column 50) + +;; (run-at-time "05:00" 86400 (lambda () +;; (setq org-habit-show-habits t) +;; (org-agenda-redo) +;; (message "Habits turned on"))) + -(run-at-time "05:00" 86400 (lambda () - (setq org-habit-show-habits t) - (org-agenda-redo) - (message "Habits turned on"))) (setq org-agenda-files '("~/Org" "~/Org/projects" diff --git a/conf.org b/conf.org index e5a9a10..1e4d8d8 100644 --- a/conf.org +++ b/conf.org @@ -46,10 +46,6 @@ work in progress (add-hook 'inferior-ess-mode-hook #'prettify-symbols-mode) (add-hook 'prog-mode-hook #'prettify-symbols-mode) #+END_SRC -*** highlight current line -#+BEGIN_SRC emacs-lisp -(when window-system (global-hl-line-mode t)) -#+END_SRC ** yes-no prompt enhancement #+BEGIN_SRC emacs-lisp (defalias 'yes-or-no-p 'y-or-n-p) ; eliminate yes or no prompt on killing procs @@ -113,6 +109,8 @@ These are commands that should work in any mode. Make the assumption that functi #+BEGIN_SRC emacs-lisp (global-set-key (kbd "") 'org-agenda) (global-set-key (kbd "") 'org-capture) + (global-set-key (kbd "") 'global-hl-line-mode) + (global-set-key (kbd "S-") 'display-line-numbers-mode) #+END_SRC * printing ** @@ -272,6 +270,11 @@ vim is all about escape, not...ctrl+g??? (setq fci-rule-use-dashes t) (add-hook 'prog-mode-hook #'fci-mode)) #+END_SRC +** rainbow +#+BEGIN_SRC emacs-lisp +(use-package rainbow-mode + :ensure t) +#+END_SRC * library A place for duct tape code that I developed (or lovingly stole from others) ** macros @@ -407,6 +410,15 @@ event of an error or nonlocal exit." (setq python-indent 4))) #+END_SRC +** haskell +#+BEGIN_SRC emacs-lisp +(use-package haskell-mode + :ensure t + :config + ;; enable dynamic linking by default + (setq haskell-compile-command "ghc -dynamic -Wall -ferror-spans -fforce-recomp -c %s") + (setq haskell-interactive-popup-errors nil)) +#+END_SRC * org-mode ** basic #+BEGIN_SRC emacs-lisp @@ -678,12 +690,16 @@ There are several types of tags I use: #+END_SRC ** habits #+BEGIN_SRC emacs-lisp -(setq org-habit-graph-column 50) +;; (setq org-habit-graph-column 50) + +;; (run-at-time "05:00" 86400 (lambda () +;; (setq org-habit-show-habits t) +;; (org-agenda-redo) +;; (message "Habits turned on"))) +#+END_SRC +** clocking +#+BEGIN_SRC emacs-lisp -(run-at-time "05:00" 86400 (lambda () - (setq org-habit-show-habits t) - (org-agenda-redo) - (message "Habits turned on"))) #+END_SRC ** agenda *** basic config