Rearrange extension config (alphabetically)

This commit is contained in:
tecosaur 2020-03-18 01:14:15 +08:00
parent b2455b3e52
commit 9ec41860a9

View file

@ -350,6 +350,25 @@ inserts an org-ified version at point. Isn't that just great.
(package! org-chef)
#+END_SRC
* Package configuration
** Abbrev mode
Thanks to [[https://emacs.stackexchange.com/questions/45462/use-a-single-abbrev-table-for-multiple-modes/45476#45476][use a single abbrev-table for multiple modes? - Emacs Stack Exchange]] I
have the following.
#+BEGIN_SRC emacs-lisp
(use-package abbrev
:init
(setq-default abbrev-mode t)
;; a hook funtion that sets the abbrev-table to org-mode-abbrev-table
;; whenever the major mode is a text mode
(defun tec/set-text-mode-abbrev-table ()
(if (derived-mode-p 'text-mode)
(setq local-abbrev-table org-mode-abbrev-table)))
:commands abbrev-mode
:hook
(abbrev-mode . tec/set-text-mode-abbrev-table)
:config
(setq abbrev-file-name (expand-file-name "abbrev.el" doom-private-dir))
(setq save-abbrevs 'silently))
#+END_SRC
** Centaur Tabs
We want to make the tabs a nice, comfy size (~36~), with icons. The modifier
marker is nice, but the particular default Unicode one causes a lag spike, so
@ -459,24 +478,25 @@ So I'm going to make use of ~flyspell-lazy~
#+BEGIN_SRC emacs-lisp
(after! flyspell (require 'flyspell-lazy) (flyspell-lazy-mode 1))
#+END_SRC
** Abbrev mode
Thanks to [[https://emacs.stackexchange.com/questions/45462/use-a-single-abbrev-table-for-multiple-modes/45476#45476][use a single abbrev-table for multiple modes? - Emacs Stack Exchange]] I
have the following.
** Tramp
Let's try to make tramp handle prompts better
#+BEGIN_SRC emacs-lisp
(use-package abbrev
:init
(setq-default abbrev-mode t)
;; a hook funtion that sets the abbrev-table to org-mode-abbrev-table
;; whenever the major mode is a text mode
(defun tec/set-text-mode-abbrev-table ()
(if (derived-mode-p 'text-mode)
(setq local-abbrev-table org-mode-abbrev-table)))
:commands abbrev-mode
:hook
(abbrev-mode . tec/set-text-mode-abbrev-table)
:config
(setq abbrev-file-name (expand-file-name "abbrev.el" doom-private-dir))
(setq save-abbrevs 'silently))
(after! tramp
(setenv "SHELL" "/bin/bash")
(setq tramp-shell-prompt-pattern "\\(?:^\\| \\)[^]#$%>\n]*#?[]#$%>] *\\(\\[[0-9;]*[a-zA-Z] *\\)*")) ;; defult + 
#+END_SRC
**** Troubleshooting
In case the remote shell is misbehaving, here are some things to try
***** Zsh
There are some escape code you don't want, let's make it behave more considerately.
#+BEGIN_SRC shell :eval no :tangle no
if [[ "$TERM" == "dumb" ]]; then
unset zle_bracketed_paste
unset zle
PS1='$ '
return
fi
#+END_SRC
** Treemacs
Quite often there are superfluous files I'm not that interested in. There's no
good reason for them to take up space.
@ -524,17 +544,20 @@ ignored. This ends up being nice and simple.
(push #'treemacs-ignore-filter treemacs-ignored-file-predicates))
#+END_SRC
** Miscellaneous
*** wttrin
Set the default city. It's initially ~Taipei~ but I find the IP-locating that's
done perfectly acceptable, so let's make that happen.
*** calc
Radians are just better
#+BEGIN_SRC emacs-lisp
(setq wttrin-default-cities '(""))
(setq calc-angle-mode 'rad)
#+END_SRC
*** electric pair mode
We want this everywhere
#+BEGIN_SRC emacs-lisp
(electric-pair-mode t)
#+END_SRC
*** ispell
#+BEGIN_SRC emacs-lisp
(setq ispell-dictionary "en_GBs_au_SCOWL_80_0_k_hr")
#+END_SRC
*** spray
Let's make this suit me slightly better.
#+BEGIN_SRC emacs-lisp
@ -546,33 +569,11 @@ Let's automaticly update terminals on theme change
#+BEGIN_SRC emacs-lisp
(add-hook 'doom-load-theme-hook 'theme-magic-from-emacs)
#+END_SRC
*** calc
Radians are just better
*** wttrin
Set the default city. It's initially ~Taipei~ but I find the IP-locating that's
done perfectly acceptable, so let's make that happen.
#+BEGIN_SRC emacs-lisp
(setq calc-angle-mode 'rad)
#+END_SRC
*** Tramp
Let's try to make tramp handle prompts better
#+BEGIN_SRC emacs-lisp
(after! tramp
(setenv "SHELL" "/bin/bash")
(setq tramp-shell-prompt-pattern "\\(?:^\\| \\)[^]#$%>\n]*#?[]#$%>] *\\(\\[[0-9;]*[a-zA-Z] *\\)*")) ;; defult + 
#+END_SRC
**** Troubleshooting
In case the remote shell is misbehaving, here are some things to try
***** Zsh
There are some escape code you don't want, let's make it behave more considerately.
#+BEGIN_SRC shell :eval no :tangle no
if [[ "$TERM" == "dumb" ]]; then
unset zle_bracketed_paste
unset zle
PS1='$ '
return
fi
#+END_SRC
*** ispell
#+BEGIN_SRC emacs-lisp
(setq ispell-dictionary "en_GBs_au_SCOWL_80_0_k_hr")
(setq wttrin-default-cities '(""))
#+END_SRC
* Language configuration
*** File Templates
@ -1394,10 +1395,11 @@ Then let's bind the content to a function, and define some nice helpers.
Let's enhance ~TeX-fold-math~ a bit
#+BEGIN_SRC emacs-lisp
(setq TeX-fold-math-spec-list
'(;; missing symbols
'(;; missing/better symbols
("≤" ("le"))
("≥" ("ge"))
("≠" ("ne"))
("★" ("star"))
;; conviniance shorts
("" ("left"))
("" ("right"))