[emacs] assimilate hlint-refactor
[~bandali/configs] / init.org
index 1a2d59e..7127c0e 100644 (file)
--- a/init.org
+++ b/init.org
@@ -44,7 +44,6 @@ byte-compiled the packages. Something along these lines should work:
 git clone https://github.com/aminb/dotfiles ~/.emacs.d
 cd ~/.emacs.d
 make bootstrap-borg
 git clone https://github.com/aminb/dotfiles ~/.emacs.d
 cd ~/.emacs.d
 make bootstrap-borg
-make tangle-init
 make bootstrap
 make build
 #+end_src
 make bootstrap
 make build
 #+end_src
@@ -168,10 +167,6 @@ done initializing.
 (add-hook
  'after-init-hook
  (lambda ()
 (add-hook
  'after-init-hook
  (lambda ()
-   (let ((elapsed (float-time (time-subtract (current-time)
-                                             ab--before-user-init-time))))
-     (message "Loading %s...done (%.3fs) [after-init]"
-              user-init-file elapsed))
    (setq gc-cons-threshold ab--gc-cons-threshold
          gc-cons-percentage ab--gc-cons-percentage
          file-name-handler-alist ab--file-name-handler-alist)))
    (setq gc-cons-threshold ab--gc-cons-threshold
          gc-cons-percentage ab--gc-cons-percentage
          file-name-handler-alist ab--file-name-handler-alist)))
@@ -353,17 +348,28 @@ Font stack with better unicode support, around =Ubuntu Mono= and
   (set-fontset-font
    ft
    'unicode
   (set-fontset-font
    ft
    'unicode
-   (font-spec
-    :name "Hack")
+   (font-spec :name "DejaVu Sans Mono")
    nil
    'append)
    nil
    'append)
+  ;; (set-fontset-font
+  ;;  ft
+  ;;  'unicode
+  ;;  (font-spec
+  ;;   :name "Symbola monospacified for DejaVu Sans Mono")
+  ;;  nil
+  ;;  'append)
+  ;; (set-fontset-font
+  ;;  ft
+  ;;  #x2115  ; ℕ
+  ;;  (font-spec :name "DejaVu Sans Mono")
+  ;;  nil
+  ;;  'append)
   (set-fontset-font
    ft
   (set-fontset-font
    ft
-   'unicode
-   (font-spec
-    :name "Symbola monospacified for DejaVu Sans Mono")
+   (cons ?Α ?ω)
+   (font-spec :name "DejaVu Sans Mono" :size 14)
    nil
    nil
-   'append))
+   'prepend))
 #+end_src
 
 * Core
 #+end_src
 
 * Core
@@ -833,7 +839,7 @@ There's no way I could top that, so I won't attempt to.
 
 #+begin_src emacs-lisp
 (use-package counsel
 
 #+begin_src emacs-lisp
 (use-package counsel
-  :defer 1.5
+  :defer 1
   :bind (([remap execute-extended-command] . counsel-M-x)
          ([remap find-file] . counsel-find-file)
          ("s-r"     . counsel-recentf)
   :bind (([remap execute-extended-command] . counsel-M-x)
          ([remap find-file] . counsel-find-file)
          ("s-r"     . counsel-recentf)
@@ -927,7 +933,7 @@ TODO: break this giant source block down into individual org sections.
 
 * Programming modes
 
 
 * Programming modes
 
-** Lean mode
+** [[https://github.com/leanprover/lean-mode][Lean]]
 
 #+begin_src emacs-lisp
 (use-package lean-mode
 
 #+begin_src emacs-lisp
 (use-package lean-mode
@@ -935,6 +941,31 @@ TODO: break this giant source block down into individual org sections.
              ("S-SPC" . company-complete)))
 #+end_src
 
              ("S-SPC" . company-complete)))
 #+end_src
 
+** Haskell
+
+*** [[https://github.com/haskell/haskell-mode][haskell-mode]]
+
+#+begin_src emacs-lisp
+(use-package haskell-mode
+  :config
+  (setq haskell-indentation-layout-offset 4
+        haskell-indentation-left-offset 4
+        haskell-indentation-ifte-offset 4))
+#+end_src
+
+*** [[https://github.com/mpickering/hlint-refactor-mode][hlint-refactor]]
+
+Emacs bindings for [[https://github.com/ndmitchell/hlint][hlint]]'s refactor option. This requires the refact
+executable from [[https://github.com/mpickering/apply-refact][apply-refact]].
+
+#+begin_src emacs-lisp
+(use-package hlint-refactor
+  :bind (:map hlint-refactor-mode-map
+             ("C-c l b" . hlint-refactor-refactor-buffer)
+             ("C-c l r" . hlint-refactor-refactor-at-point))
+  :hook (haskell-mode . hlint-refactor-mode))
+#+end_src
+
 * Post initialization
 :PROPERTIES:
 :CUSTOM_ID: post-initialization
 * Post initialization
 :PROPERTIES:
 :CUSTOM_ID: post-initialization