Minor refactor & reformatting across the board

This commit is contained in:
Henrik Lissner 2020-04-08 15:29:29 -04:00
parent 2957f5ff28
commit b78fc4eb76
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
27 changed files with 189 additions and 164 deletions

View file

@ -97,7 +97,8 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
"v" #'find-variable
"l" #'find-library)))
;; Adapted from http://www.modernemacs.com/post/comint-highlighting/
;; Adapted from http://www.modernemacs.com/post/comint-highlighting/ to add
;; syntax highlighting to ielm REPLs.
(add-hook! 'ielm-mode-hook
(defun +emacs-lisp-init-syntax-highlighting-h ()
(font-lock-add-keywords
@ -122,7 +123,7 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
;;;###package overseer
(autoload 'overseer-test "overseer" nil t)
(remove-hook 'emacs-lisp-mode-hook 'overseer-enable-mode)
(remove-hook 'emacs-lisp-mode-hook #'overseer-enable-mode)
(use-package! flycheck-cask

View file

@ -3,16 +3,16 @@
(use-package! intero
:commands intero-mode
:init
(add-hook! 'haskell-mode-local-vars-hook
(defun +haskell-init-intero-h ()
"Initializes `intero-mode' in haskell-mode, unless stack isn't installed.
This is necessary because `intero-mode' doesn't do its own error checks."
(when (derived-mode-p 'haskell-mode)
(if (executable-find "stack")
(intero-mode +1)
(message "Couldn't find stack. Refusing to enable intero-mode.")))))
:hook (haskell-mode-local-vars . +haskell-init-intero-h)
:config
(defun +haskell-init-intero-h ()
"Initializes `intero-mode' in haskell-mode, unless stack isn't installed.
This is necessary because `intero-mode' doesn't do its own error checks."
(when (derived-mode-p 'haskell-mode)
(if (executable-find "stack")
(intero-mode +1)
(message "Couldn't find stack. Refusing to enable intero-mode."))))
(setq haskell-compile-cabal-build-command "stack build --fast")
(set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition)
(set-company-backend! 'intero-mode 'intero-company)

View file

@ -6,9 +6,8 @@
:config
(when IS-MAC
(setq lsp-haskell-process-path-hie "hie-wrapper"))
;; Does some strange indentation if it pastes in the snippet
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed)
(when (featurep! +ghcide)
(setq lsp-haskell-process-path-hie "ghcide"
lsp-haskell-process-args-hie nil)))
lsp-haskell-process-args-hie nil))
;; Does some strange indentation if it pastes in the snippet
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed))

View file

@ -11,8 +11,8 @@
"An alist mapping languages to babel libraries. This is necessary for babel
libraries (ob-*.el) that don't match the name of the language.
For example, with (fish . shell) will cause #+BEGIN_SRC fish to load ob-shell.el
when executed.")
For example, (fish . shell) will cause #+BEGIN_SRC fish blocks to load
ob-shell.el when executed.")
(defvar +org-babel-load-functions ()
"A list of functions executed to load the current executing src block. They

View file

@ -22,7 +22,6 @@
(:map org-journal-search-mode-map
"C-n" #'org-journal-search-next
"C-p" #'org-journal-search-previous)
:localleader
(:map org-journal-mode-map
"c" #'org-journal-new-entry

View file

@ -11,7 +11,7 @@
;;; Packages
(use-package! sh-script ; built-in
:mode ("\\.zunit\\'" . sh-mode)
:mode ("\\.\\(?:zunit\\|env\\)\\'" . sh-mode)
:mode ("/bspwmrc\\'" . sh-mode)
:config
(set-electric! 'sh-mode :words '("else" "elif" "fi" "done" "then" "do" "esac" ";;"))

View file

@ -24,10 +24,9 @@
(add-hook! '(css-mode-hook sass-mode-hook stylus-mode-hook)
#'rainbow-mode)
;; built-in, and contains both css-mode & scss-mode
;; built-in. Contains both css-mode & scss-mode
(after! css-mode
;; css-mode hooks apply to scss and less-css modes
(add-hook 'css-mode-hook #'rainbow-delimiters-mode)
(map! :localleader
:map scss-mode-map
"b" #'+css/scss-build
@ -61,5 +60,7 @@
;;; Tools
(when (featurep! +lsp)
(add-hook! '(css-mode-hook sass-mode-hook less-css-mode-hook)
(add-hook! '(css-mode-local-vars-hook
sass-mode-local-vars-hook
less-css-mode-local-vars-hook)
#'lsp!))