Tidy
This commit is contained in:
parent
60f9aae799
commit
866e6cf2bd
86
README.org
86
README.org
@ -227,11 +227,9 @@ The [[info:emacs#Init File][init file (info)]] does not load the ~custom-file~ a
|
|||||||
orderless ; Emacs completion style
|
orderless ; Emacs completion style
|
||||||
org-menu ; transient menu for org-mode
|
org-menu ; transient menu for org-mode
|
||||||
quelpa ; install Emacs packages from source
|
quelpa ; install Emacs packages from source
|
||||||
smartparens ; smart editing of character pairs
|
|
||||||
vertico ; VERTical Interactive Completion
|
vertico ; VERTical Interactive Completion
|
||||||
wgrep ; open a writable grep buffer
|
wgrep ; open a writable grep buffer
|
||||||
xr ; undo rx to grok regular expressions
|
xr))) ; undo rx to grok regular expressions
|
||||||
yasnippet))) ; code or text template expansion
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+caption[Customize the third set of Emacs variables]:
|
#+caption[Customize the third set of Emacs variables]:
|
||||||
@ -345,18 +343,17 @@ the contents of packages and allows to update packages to the latest version.
|
|||||||
|
|
||||||
Section [[#sec:text-faces-or-styles][text faces or styles]] tells that this setup does not use theming.
|
Section [[#sec:text-faces-or-styles][text faces or styles]] tells that this setup does not use theming.
|
||||||
However, in order to improve visibility, it relies on:
|
However, in order to improve visibility, it relies on:
|
||||||
1. Tweaking faces in memory after loading as in listing
|
1. Tweaking the background color of the already loaded =region= face as in
|
||||||
[[lst:tweak-faces-faces-after]].
|
listing [[lst:tweak-region-face-background-color]].
|
||||||
2. Toggling between a dark and light background by means of
|
2. Toggling between a dark and light background by means of
|
||||||
src_emacs-lisp{(invert-default-face)} in listing [[lst:invert-default-face]].
|
src_emacs-lisp{(invert-default-face)} in listing [[lst:invert-default-face]].
|
||||||
3. Shadowing the definition of faces before loading as in listing
|
3. Shadowing the definition of faces before loading as in listing
|
||||||
[[lst:tweak-org-faces-before]] and [[lst:tweak-sh-script-faces-before]]. The last
|
[[lst:tweak-org-block-face]] and [[lst:tweak-sh-heredoc-face]]. The last item in the
|
||||||
item in the page on [[https://orgmode.org/worg/org-contrib/babel/examples/fontify-src-code-blocks.html#org5c4406f][fontifying Org mode source code blocks]] describes this
|
page on [[https://orgmode.org/worg/org-contrib/babel/examples/fontify-src-code-blocks.html#org5c4406f][fontifying Org mode source code blocks]] describes this method.
|
||||||
method.
|
|
||||||
|
|
||||||
#+caption[Improve the visibility of faces in =faces.el=]:
|
#+caption[Tweak the background color of the =region= face in =faces.el=]:
|
||||||
#+caption: Improve the visibility of faces in =faces.el=.
|
#+caption: Tweak the background color of the =region= face in =faces.el=.
|
||||||
#+name: lst:tweak-faces-faces-after
|
#+name: lst:tweak-region-face-background-color
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(with-eval-after-load 'emacs
|
(with-eval-after-load 'emacs
|
||||||
(defun tweak-region-face-background-color ()
|
(defun tweak-region-face-background-color ()
|
||||||
@ -382,9 +379,9 @@ However, in order to improve visibility, it relies on:
|
|||||||
(tweak-region-face-background-color)))
|
(tweak-region-face-background-color)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+caption[Improve the visibility of faces in =org-faces.el=]:
|
#+caption[Improve the visibility of the =org-block= face in =org-faces.el=]:
|
||||||
#+caption: Improve the visibility of faces in =org-faces.el=.
|
#+caption: Improve the visibility of the =org-block= face in =org-faces.el=.
|
||||||
#+name: lst:tweak-org-faces-before
|
#+name: lst:tweak-org-block-face
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(with-eval-after-load 'emacs
|
(with-eval-after-load 'emacs
|
||||||
;; Shadow the definition in org-faces.el:
|
;; Shadow the definition in org-faces.el:
|
||||||
@ -410,9 +407,9 @@ However, in order to improve visibility, it relies on:
|
|||||||
`org-quote' faces, which inherit from `org-block'."))
|
`org-quote' faces, which inherit from `org-block'."))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+caption[Improve the visibility of faces in =sh-script.el=]:
|
#+caption[Improve the visibility of the =sh-heredoc= face in =sh-script.el=]:
|
||||||
#+caption: Improve the visibility of faces in =sh-script.el=.
|
#+caption: Improve the visibility of the =sh-heredoc= face in =sh-script.el=.
|
||||||
#+name: lst:tweak-sh-script-faces-before
|
#+name: lst:tweak-sh-heredoc-face
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(with-eval-after-load 'emacs
|
(with-eval-after-load 'emacs
|
||||||
;; Shadow the definition in sh-script.el:
|
;; Shadow the definition in sh-script.el:
|
||||||
@ -3454,37 +3451,37 @@ contrary to for instance [[https://github.com/Fanael/rainbow-delimiters#readme][
|
|||||||
#+caption: Configure =smartparens=.
|
#+caption: Configure =smartparens=.
|
||||||
#+name: lst:configure-smartparens
|
#+name: lst:configure-smartparens
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(with-eval-after-load 'emacs
|
(when (and (ensure-package-installation 'smartparens)
|
||||||
;; Require `smartparens-config' instead of `smartparens' to disable
|
;; Require `smartparens-config' instead of `smartparens' to
|
||||||
;; pairing of the quote character for lisp modes,
|
;; disable pairing of the quote character for lisp modes.
|
||||||
(when (require 'smartparens-config nil 'noerror)
|
(require 'smartparens-config nil 'noerror))
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
'(sp-base-key-bindings 'sp)
|
'(sp-base-key-bindings 'sp)
|
||||||
'(sp-override-key-bindings '(("C-(" . sp-backward-barf-sexp)
|
'(sp-override-key-bindings '(("C-(" . sp-backward-barf-sexp)
|
||||||
("C-)" . sp-forward-slurp-sexp))))
|
("C-)" . sp-forward-slurp-sexp))))
|
||||||
|
|
||||||
(dolist (hook '(prog-mode-hook text-mode-hook))
|
(dolist (hook '(prog-mode-hook text-mode-hook))
|
||||||
(add-hook hook #'smartparens-mode))
|
(add-hook hook #'smartparens-mode))
|
||||||
|
|
||||||
(dolist (hook '(emacs-lisp-mode-hook
|
(dolist (hook '(emacs-lisp-mode-hook
|
||||||
ielm-mode-hook
|
ielm-mode-hook
|
||||||
lisp-mode-hook
|
lisp-mode-hook
|
||||||
python-mode-hook
|
python-mode-hook
|
||||||
sly-mrepl-mode-hook))
|
sly-mrepl-mode-hook))
|
||||||
(add-hook hook #'smartparens-strict-mode))
|
(add-hook hook #'smartparens-strict-mode))
|
||||||
|
|
||||||
;; https://xenodium.com/emacs-smartparens-auto-indent/index.html
|
;; https://xenodium.com/emacs-smartparens-auto-indent/index.html
|
||||||
(defun indent-between-pair (&rest _ignored)
|
(defun indent-between-pair (&rest _ignored)
|
||||||
(newline)
|
(newline)
|
||||||
(indent-according-to-mode)
|
(indent-according-to-mode)
|
||||||
(forward-line -1)
|
(forward-line -1)
|
||||||
(indent-according-to-mode))
|
(indent-according-to-mode))
|
||||||
|
|
||||||
(dolist (left '("(" "[" "{"))
|
(dolist (left '("(" "[" "{"))
|
||||||
(sp-local-pair 'prog-mode left
|
(sp-local-pair 'prog-mode left
|
||||||
nil :post-handlers '((indent-between-pair "RET"))))
|
nil :post-handlers '((indent-between-pair "RET"))))
|
||||||
|
|
||||||
(show-smartparens-global-mode +1)))
|
(show-smartparens-global-mode +1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** [[https://github.com/davidshepherd7/electric-operator#readme][Electric operators]]
|
** [[https://github.com/davidshepherd7/electric-operator#readme][Electric operators]]
|
||||||
@ -3515,7 +3512,8 @@ code formatter for Python]].
|
|||||||
#+caption: Enable =yas-global-mode=.
|
#+caption: Enable =yas-global-mode=.
|
||||||
#+name: lst:enable-yas-global-mode
|
#+name: lst:enable-yas-global-mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (require 'yasnippet nil 'noerror)
|
(when (and (ensure-package-installation 'yasnippet)
|
||||||
|
(require 'yasnippet nil 'noerror))
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
'(yas-alias-to-yas/prefix-p nil))
|
'(yas-alias-to-yas/prefix-p nil))
|
||||||
(yas-global-mode +1))
|
(yas-global-mode +1))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user