parent
a354bba261
commit
19ecf8e46a
25 changed files with 39 additions and 39 deletions
|
@ -10,7 +10,7 @@
|
|||
(use-package! direnv
|
||||
:after-call (after-find-file dired-initial-position-hook)
|
||||
:config
|
||||
(add-hook 'direnv-mode-hook
|
||||
(add-hook! 'direnv-mode-hook
|
||||
(defun +direnv-init-h ()
|
||||
"Instead of checking for direnv on `post-command-hook', check on
|
||||
buffer/window/frame switch, which is less expensive."
|
||||
|
@ -23,7 +23,7 @@ buffer/window/frame switch, which is less expensive."
|
|||
|
||||
;; Fontify special .envrc keywords; it's a good indication of whether or not
|
||||
;; we've typed them correctly.
|
||||
(add-hook 'direnv-envrc-mode-hook
|
||||
(add-hook! 'direnv-envrc-mode-hook
|
||||
(defun +direnv-envrc-fontify-keywords-h ()
|
||||
(font-lock-add-keywords
|
||||
nil `((,(regexp-opt +direnv--keywords 'symbols)
|
||||
|
|
|
@ -34,14 +34,14 @@ extension, try to guess one."
|
|||
"")))))
|
||||
(funcall orig-fn)))
|
||||
|
||||
(add-hook 'editorconfig-after-apply-functions
|
||||
(add-hook! 'editorconfig-after-apply-functions
|
||||
(defun +editorconfig-disable-ws-butler-maybe-h (props)
|
||||
"Disable `ws-butler-mode' if trim_trailing_whitespace is true."
|
||||
(when (and (equal (gethash 'trim_trailing_whitespace props) "true")
|
||||
(bound-and-true-p ws-butler-mode))
|
||||
(ws-butler-mode -1))))
|
||||
|
||||
(add-hook 'editorconfig-after-apply-functions
|
||||
(add-hook! 'editorconfig-after-apply-functions
|
||||
(defun +editorconfig-disable-indent-detection-h (props)
|
||||
"Inhibit `dtrt-indent' if an explicit indent_style and indent_size is
|
||||
specified by editorconfig."
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
(insert output))
|
||||
(setq quickrun-option-outputter quickrun--original-outputter))))
|
||||
|
||||
(add-hook 'quickrun-after-run-hook
|
||||
(add-hook! 'quickrun-after-run-hook
|
||||
(defun +eval-quickrun-shrink-window-h ()
|
||||
"Shrink the quickrun output window once code evaluation is complete."
|
||||
(when-let (win (get-buffer-window quickrun--buffer-name))
|
||||
|
@ -46,7 +46,7 @@
|
|||
(let ((ignore-window-parameters t))
|
||||
(shrink-window-if-larger-than-buffer))))))
|
||||
|
||||
(add-hook 'quickrun-after-run-hook
|
||||
(add-hook! 'quickrun-after-run-hook
|
||||
(defun +eval-quickrun-scroll-to-bof-h ()
|
||||
"Ensures window is scrolled to BOF on invocation."
|
||||
(when-let (win (get-buffer-window quickrun--buffer-name))
|
||||
|
|
|
@ -15,7 +15,7 @@ errors.")
|
|||
;; new-line checks are a mote excessive; idle checks are more than enough
|
||||
(delq! 'new-line flycheck-check-syntax-automatically)
|
||||
|
||||
(add-hook 'doom-escape-hook
|
||||
(add-hook! 'doom-escape-hook
|
||||
(defun +flycheck-buffer-h ()
|
||||
"Flycheck buffer on ESC in normal mode."
|
||||
(when flycheck-mode
|
||||
|
@ -23,7 +23,7 @@ errors.")
|
|||
nil))
|
||||
'append)
|
||||
|
||||
(add-hook 'flycheck-after-syntax-check-hook
|
||||
(add-hook! 'flycheck-after-syntax-check-hook
|
||||
(defun +flycheck-adjust-syntax-check-eagerness-h ()
|
||||
"Check for errors less often when there aren't any.
|
||||
Done to reduce the load flycheck imposes on the current buffer."
|
||||
|
|
|
@ -27,7 +27,7 @@ Since spellchecking can be slow in some buffers, this can be disabled with:
|
|||
(setq ispell-program-name "aspell"
|
||||
ispell-extra-args '("--sug-mode=ultra" "--run-together"))
|
||||
|
||||
(add-hook 'text-mode-hook
|
||||
(add-hook! 'text-mode-hook
|
||||
(defun +flyspell-remove-run-together-switch-for-aspell-h ()
|
||||
(setq-local ispell-extra-args (remove "--run-together" ispell-extra-args))))
|
||||
|
||||
|
@ -51,7 +51,7 @@ Since spellchecking can be slow in some buffers, this can be disabled with:
|
|||
(when (featurep! +prog)
|
||||
(add-hook 'prog-mode-hook #'flyspell-prog-mode))
|
||||
|
||||
(add-hook 'flyspell-mode-hook
|
||||
(add-hook! 'flyspell-mode-hook
|
||||
(defun +flyspell-inhibit-duplicate-detection-maybe-h ()
|
||||
"Don't mark duplicates when style/grammar linters are present.
|
||||
e.g. proselint and langtool."
|
||||
|
@ -60,7 +60,7 @@ e.g. proselint and langtool."
|
|||
(featurep 'langtool))
|
||||
(setq-local flyspell-mark-duplications-flag nil))))
|
||||
|
||||
(add-hook 'flyspell-mode-hook
|
||||
(add-hook! 'flyspell-mode-hook
|
||||
(defun +flyspell-immediately-h ()
|
||||
"Spellcheck the buffer when `flyspell-mode' is enabled."
|
||||
(when (and flyspell-mode +flyspell-immediately)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue