Add some hydras and color-themes

main
Sergio Alvariño 2 years ago
parent 94aa0f3672
commit c4ba614e63

@ -8,6 +8,30 @@
- [[https://github.com/daviwil/emacs-from-scratch/blob/master/Emacs.org][System Crafters emacs-from-scratch]]
- [[https://github.com/SystemCrafters/crafter-configs][System Crafters configs compilation]]
* use-package tips
Some notes about *use-package*
- *:ensure* if true will install the package if not installed
It won't update packages. See auto-package-update for keeping all
packages up to date
- *:init* keyword to execute code *before* a package is loaded. It
accepts one or more foorms, up to the next keyword
- *:config* can be used to execute code *after* a package is loaded.
In cases where loading is done lazily (see more about autoloading
below), this execution is deferred until after the autoload
occurs
- *:custom* permite configurar variables con syntaxis simplificada
- *:bind*
- *bind-keymap*
- *:mode* and *:interpreter*
- *:magic*
- *:hook*
- *:if*
- *:defer* En general use-package intenta aplicar lazy loading, pero
en algún paquete es necesario especificarlo explicitamente
- *:demand* Este es el contrario del anterior, para paquetes
que queremos cargar de inmediato
- *:diminish* and *:delight* changes minormode display in status line
* Interface tweaks
** Some GUI optimizations
#+begin_src emacs-lisp
@ -189,6 +213,36 @@
;;(doom-modeline-icon (display-graphic-p))
)
#+end_src
* color-theme
#+begin_src emacs-lisp
;; (use-package modus-operandi-theme)
(use-package modus-themes)
;; (load-theme 'modus-operandi t)
(load-theme 'modus-vivendi t)
(use-package doom-themes
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
(load-theme 'doom-vibrant t)
;; Enable flashing mode-line on errors
(doom-themes-visual-bell-config)
;; Enable custom neotree theme (all-the-icons must be installed!)
(doom-themes-neotree-config)
;; or for treemacs users
(setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
(doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config)
)
#+end_src
* Completion systems
** Vertico (the choosed one)
Have a look [[https://github.com/minad/vertico][here]]
@ -311,9 +365,53 @@
** Hydra
[[https://github.com/abo-abo/hydra][Hydra repo]]
#+begin_src emacs-lisp
(use-package hydra)
(use-package hydra)
#+end_src
*** Hydra for toggle
#+begin_src emacs-lisp
(global-set-key
(kbd "<f6> t")
(defhydra hydra-toggle (:color pink)
"
_a_ abbrev-mode: %`abbrev-mode
_d_ debug-on-error: %`debug-on-error
_f_ auto-fill-mode: %`auto-fill-function
_l_ disp-line-num %`display-line-numbers-mode
_s_ flyspell-mode: %`flyspell-mode
_t_ truncate-lines: %`truncate-lines
_w_ whitespace-mode: %`global-whitespace-mode
"
("a" abbrev-mode nil)
("d" toggle-debug-on-error nil)
("f" auto-fill-mode nil)
("l" display-line-numbers-mode nil)
("s" flyspell-mode nil)
("t" toggle-truncate-lines nil)
("w" whitespace-mode nil)
("q" nil "quit"))
)
#+end_src
*** Hydra for navigation
#+begin_src emacs-lisp
(global-set-key
(kbd "<f6> j")
(defhydra gotoline
(:pre (linum-mode 1)
:post (linum-mode -1))
"goto"
("t" (lambda () (interactive)(move-to-window-line-top-bottom 0)) "top")
("b" (lambda () (interactive)(move-to-window-line-top-bottom -1)) "bottom")
("m" (lambda () (interactive)(move-to-window-line-top-bottom)) "middle")
("e" (lambda () (interactive)(end-of-buffer)) "end")
("c" recenter-top-bottom "recenter")
("n" next-line "down")
("p" (lambda () (interactive) (forward-line -1)) "up")
("g" goto-line "goto-line")
)
)
#+end_src
* next
#+begin_src emacs-lisp

Loading…
Cancel
Save