(Emacs/config)~Clean up around shop

This commit is contained in:
2024-06-25 13:00:54 +01:00
parent 09366cef64
commit b6aa018bd7

View File

@@ -523,19 +523,18 @@ these capabilities but there are further packages which integrate them
into Evil. into Evil.
*** Evil core *** Evil core
Setup the evil package, with some opinionated keybindings: Setup the evil package, with some opinionated keybindings:
- Switch ~evil-upcase~ and ~evil-downcase~ because I use ~evil-upcase~ + Switch ~evil-upcase~ and ~evil-downcase~ because I use ~evil-upcase~
more more
- Switch ~evil-goto-mark~ and ~evil-goto-mark-line~ as I'd rather have + Switch ~evil-goto-mark~ and ~evil-goto-mark-line~ as I'd rather have
the global one closer to the home row the global one closer to the home row
- Push the mark when exiting visual mode + Use 'T' character as an action for "transposing objects"
- On entering visual mode, the mark is set, so by pushing it when + Swapping any two textual "objects" is such a Vim thing (the verb
exiting we can use the mark-ring for other stuff object model) but by default it can't seem to do it. But Emacs
- Use 'T' character as an action for transposing objects can...
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package evil (use-package evil
:demand t :demand t
:straight t :straight t
:hook (evil-visual-state-entry-hook . push-mark)
:general :general
(leader (leader
"w" '(evil-window-map :which-key "Window") "w" '(evil-window-map :which-key "Window")
@@ -660,7 +659,7 @@ in providing good user experience. By default Emacs provides
'completions-list' which produces a buffer of options which can be 'completions-list' which produces a buffer of options which can be
searched and selected. We can take this further though! searched and selected. We can take this further though!
Ido and Icomplete are packages distributed with Emacs to provide Ido and IComplete are packages distributed with Emacs to provide
greater completion interfaces. They utilise the minibuffer to create greater completion interfaces. They utilise the minibuffer to create
a more interactive experience, allowing incremental searches and a more interactive experience, allowing incremental searches and
option selection. option selection.
@@ -758,9 +757,11 @@ looking for a command.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package amx (use-package amx
:straight t :straight t
:hook (after-init-hook . amx-mode) :defer 2
:init :init
(setq amx-backend 'ivy)) (setq amx-backend 'ivy)
:config
(amx-mode))
#+end_src #+end_src
*** Orderless *** Orderless
Orderless sorting method for completion, probably one of the best Orderless sorting method for completion, probably one of the best
@@ -1583,7 +1584,8 @@ Here I setup dired with a few niceties
(dired-mode-hook . dired-omit-mode) (dired-mode-hook . dired-omit-mode)
:init :init
(setq-default dired-listing-switches "-AFBlu --group-directories-first" (setq-default dired-listing-switches "-AFBlu --group-directories-first"
dired-omit-files "^\\." dired-omit-files "^\\." ; dotfiles
dired-omit-verbose nil
dired-dwim-target t dired-dwim-target t
dired-kill-when-opening-new-dired-buffer t) dired-kill-when-opening-new-dired-buffer t)
(with-eval-after-load "evil-collection" (with-eval-after-load "evil-collection"
@@ -2508,8 +2510,7 @@ expression. Rainbow flag in your Lisp source code.
:general :general
(mode-leader "r" #'rainbow-delimiters-mode) (mode-leader "r" #'rainbow-delimiters-mode)
:hook :hook
(lisp-mode-hook . rainbow-delimiters-mode) ((lisp-mode-hook emacs-lisp-mode-hook racket-mode-hook) . rainbow-delimiters-mode))
(emacs-lisp-mode-hook . rainbow-delimiters-mode))
#+end_src #+end_src
* Org mode * Org mode
Org is, at its most basic, a markup language. =org-mode= is a major Org is, at its most basic, a markup language. =org-mode= is a major
@@ -3265,18 +3266,16 @@ execution of d-mode blocks and alias ~D-mode~ with ~d-mode~.
(with-eval-after-load "eglot" (with-eval-after-load "eglot"
(add-to-list 'eglot-server-programs '(rust-mode "rust-analyzer")))) (add-to-list 'eglot-server-programs '(rust-mode "rust-analyzer"))))
#+end_src #+end_src
** WAIT Racket ** Racket
:PROPERTIES:
:header-args:emacs-lisp: :tangle no
:END:
A scheme with lots of stuff inside it. Using it for a language design A scheme with lots of stuff inside it. Using it for a language design
book so it's useful to have some Emacs binds for it. book so it's useful to have some Emacs binds for it.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package racket-mode (use-package racket-mode
:straight t :straight t
:defer t
:hook (racket-mode-hook . racket-xp-mode) :hook (racket-mode-hook . racket-xp-mode)
:display :display
("\\*Racket.*" ("\\*Racket REPL*"
(display-buffer-at-bottom) (display-buffer-at-bottom)
(window-height . 0.25)) (window-height . 0.25))
:init :init