Set up ws-butler-mode

This commit is contained in:
Jeremy Dormitzer 2020-06-25 14:01:21 -04:00
parent 90704aa611
commit 710fd24d7b

View File

@ -180,15 +180,6 @@ Better keybinding.
replace))) replace)))
#+END_SRC #+END_SRC
Delete trailing whitespace on save:
#+BEGIN_SRC emacs-lisp
(defvar *should-delete-trailing-whitespace* t)
(defun delete-trailing-whitespace-hook-fn ()
(when *should-delete-trailing-whitespace*
(delete-trailing-whitespace)))
(add-hook 'before-save-hook #'delete-trailing-whitespace-hook-fn)
#+END_SRC
* Autocompletion * Autocompletion
There seems to be [[https://github.com/company-mode/company-mode/issues/68][some contention]] about whether autocomplete or company are better autocomplete packages. I'm going with company for now because the maintainer seems nicer... There seems to be [[https://github.com/company-mode/company-mode/issues/68][some contention]] about whether autocomplete or company are better autocomplete packages. I'm going with company for now because the maintainer seems nicer...
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -1277,6 +1268,15 @@ Speedbar is cool but having it open in a separate frame is annoying. This makes
(leader-def-key "S" #'switch-to-speedbar) (leader-def-key "S" #'switch-to-speedbar)
#+END_SRC #+END_SRC
* Trailing whitespace
[[https://github.com/lewang/ws-butler][ws-butler]] deletes trailing whitespace on lines that you touch, but
leaves other lines alone:
#+BEGIN_SRC emacs-lisp
(use-package ws-butler
:straight (ws-butler :host github :repo "lewang/ws-butler")
:hook ((prod-mode . ws-butler-mode)))
#+END_SRC
* Whitespace Visualation * Whitespace Visualation
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq whitespace-line-column 80 (setq whitespace-line-column 80