@ -63,7 +63,7 @@ Because this project uses version-control, we can disable more unwanted features
make-backup-files nil)
make-backup-files nil)
#+end_src
#+end_src
** Packages
** Package management
Download and install packages using [[https://github.com/raxod502/straight.el][straight.el]], a functional package manager that integrates with =use-package=, giving us more control over where packages are sourced from.
Download and install packages using [[https://github.com/raxod502/straight.el][straight.el]], a functional package manager that integrates with =use-package=, giving us more control over where packages are sourced from.
@ -100,7 +100,7 @@ Complete the integration with ~use-package~ by installing it with =straight=.
(straight-use-package 'use-package)
(straight-use-package 'use-package)
#+end_src
#+end_src
**Cleanup
**Hermetic evaluation
Despite having our *stateful* and *immutable* configurations seperate, it's good practice to make efforts to reduce the trash created by Emacs.
Despite having our *stateful* and *immutable* configurations seperate, it's good practice to make efforts to reduce the trash created by Emacs.
@ -121,7 +121,7 @@ Emacs' default user interface is horrendous, but with less than 10 lines of code
(tooltip-mode -1)
(tooltip-mode -1)
#+end_src
#+end_src
**Babel
**Literate programming
*Organize your plain life in plain text*
*Organize your plain life in plain text*
@ -158,7 +158,7 @@ Emacs' default user interface is horrendous, but with less than 10 lines of code
Make the =ESC= key quit (most) prompts, instead of the default =C-g=.
Make the =ESC= key quit (most) prompts, instead of the default =C-g=.
@ -206,8 +206,6 @@ Use [[https://github.com/abo-abo/hydra][hydra]] for transient keybindings sharin
(use-package hydra)
(use-package hydra)
#+end_src
#+end_src
*** Evil
After a few hour with =vim= I knew it was game over, I cannot even think of another way I would feel comfortable editing text. Luckily, there exist packages to emulate this within Emacs.
After a few hour with =vim= I knew it was game over, I cannot even think of another way I would feel comfortable editing text. Luckily, there exist packages to emulate this within Emacs.
Another hallmark feature is [[https://github.com/magit/magit][Magit]], a complete git porcelain within Emacs.
Another hallmark feature is [[https://github.com/magit/magit][Magit]], a complete git porcelain within Emacs.
@ -345,7 +326,7 @@ Open the *status* page for the current repository with =SPC g=.
"g" '(magit-status :which-key "Magit"))
"g" '(magit-status :which-key "Magit"))
#+end_src
#+end_src
**Shell
**Terminal emulation
While not a traditional terminal emulator, =eshell= provides me with all of the functionality I expect and require from one. Some users may be left wanting more, I would recommend they look into =vterm=.
While not a traditional terminal emulator, =eshell= provides me with all of the functionality I expect and require from one. Some users may be left wanting more, I would recommend they look into =vterm=.
@ -365,7 +346,7 @@ Open an =eshell= buffer with =SPC e=.
"e" '(eshell :which-key "Shell"))
"e" '(eshell :which-key "Shell"))
#+end_src
#+end_src
** Files
** File management
Emacs' can feel more modern when icon-fonts are installed and prioritized. I feel that this makes navigation of folders much faster, given that file types may be quickly identified by their corresponding icons.
Emacs' can feel more modern when icon-fonts are installed and prioritized. I feel that this makes navigation of folders much faster, given that file types may be quickly identified by their corresponding icons.
@ -410,117 +391,7 @@ Open a dired buffer with =SPC d=.
"d" '(dired-jump :which-key "Dired"))
"d" '(dired-jump :which-key "Dired"))
#+end_src
#+end_src
** Fonts
Configure the system font with a single ~font-family~ and define the size, of which variations to the font size are relative to this value.
#+begin_src emacs-lisp
(defvar dotfiles/font "Fira Code")
(defvar dotfiles/font-size 96)
#+end_src
Write out to all *3* of Emacs' default font faces.
Define a transient keybinding for scaling the text.
#+begin_src emacs-lisp
(defhydra hydra-text-scale (:timeout 4)
"Scale"
("j" text-scale-increase "Increase")
("k" text-scale-decrease "Decrease")
("f" nil "Finished" :exit t))
#+end_src
Increase the font size in buffers with =SPC t f=.
+ Increase =j=
+ Decrease =k=
+ Finish =f=
#+begin_src emacs-lisp
(dotfiles/leader
"tf" '(hydra-text-scale/body :which-key "Font"))
#+end_src
** Lines
Relative line numbers are important when using =VI= emulation keys. You can prefix most commands with a *number*, allowing you to jump up / down by a line count.
#+begin_example
5:
4:
3:
2:
1:
156: << CURRENT LINE >>
1:
2:
3:
4:
5:
#+end_example
https://github.com/emacsmirror/linum-relative
+ Integrate with ~display-line-numbers-mode~ for performance
#+begin_src emacs-lisp
(use-package linum-relative
:init (setq linum-relative-backend
'display-line-numbers-mode)
:config (linum-relative-global-mode))
#+end_src
https://github.com/Fanael/rainbow-delimiters
+ Colourize nested parenthesis
#+begin_src emacs-lisp
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
#+end_src
** Themes
Bring Emacs' out of the *eighties* by cherry picking a few modules from =doom-emacs=. High quality and modern colour themes are provided in the [[https://github.com/hlissner/emacs-doom-themes][doom-themes]] package.
#+begin_src emacs-lisp
(use-package doom-themes
:init (load-theme 'doom-moonlight t))
#+end_src
[[https://github.com/seagle0128/doom-modeline][doom-modeline]] provides an elegant status bar / modeline.
I use Emacs as a Desktop Environment with the [[https://github.com/ch11ng/exwm][exwm]] package. It allows Emacs to function as a complete tiling window manager for =X11=.
I use Emacs as a Desktop Environment with the [[https://github.com/ch11ng/exwm][exwm]] package. It allows Emacs to function as a complete tiling window manager for =X11=.
@ -617,6 +488,15 @@ Connect our custom hooks and configure the input keys, a custom layer for defini
Configure [[https://projectile.mx][projectile]], a project interaction library for Emacs. It provides a nice set of features for operating on a project level without introducing external dependencies.
Configure [[https://projectile.mx][projectile]], a project interaction library for Emacs. It provides a nice set of features for operating on a project level without introducing external dependencies.
@ -1078,3 +958,133 @@ Apply some custom behaviour before saving:
Define a transient keybinding for scaling the text.
#+begin_src emacs-lisp
(defhydra hydra-text-scale (:timeout 4)
"Scale"
("j" text-scale-increase "Increase")
("k" text-scale-decrease "Decrease")
("f" nil "Finished" :exit t))
#+end_src
Increase the font size in buffers with =SPC t f=.
+ Increase =j=
+ Decrease =k=
+ Finish =f=
#+begin_src emacs-lisp
(dotfiles/leader
"tf" '(hydra-text-scale/body :which-key "Font"))
#+end_src
** Lines
Relative line numbers are important when using =VI= emulation keys. You can prefix most commands with a *number*, allowing you to jump up / down by a line count.
#+begin_example
5:
4:
3:
2:
1:
156: << CURRENT LINE >>
1:
2:
3:
4:
5:
#+end_example
https://github.com/emacsmirror/linum-relative
+ Integrate with ~display-line-numbers-mode~ for performance
#+begin_src emacs-lisp
(use-package linum-relative
:init (setq linum-relative-backend
'display-line-numbers-mode)
:config (linum-relative-global-mode))
#+end_src
https://github.com/Fanael/rainbow-delimiters
+ Colourize nested parenthesis
#+begin_src emacs-lisp
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
#+end_src
** Themes
Cherry pick a few modules from =doom-emacs=. High quality and modern colour themes are provided in the [[https://github.com/hlissner/emacs-doom-themes][doom-themes]] package.
#+begin_src emacs-lisp
(use-package doom-themes
:init (load-theme 'doom-moonlight t))
#+end_src
[[https://github.com/seagle0128/doom-modeline][doom-modeline]] provides an elegant status bar / modeline.
#+begin_src emacs-lisp
(use-package doom-modeline
:init (doom-modeline-mode 1)
:custom ((doom-modeline-height 16)))
#+end_src
Load a theme with =SPC t t=.
#+begin_src emacs-lisp
(dotfiles/leader
"tt" '(load-theme t t :which-key "Theme"))
#+end_src
** Dashboard
Present a dashboard when first launching Emacs.
#+begin_src emacs-lisp
(use-package dashboard
:config
(setq dashboard-center-content t
dashboard-set-init-info t
dashboard-set-file-icons t
dashboard-set-heading-icons t
dashboard-startup-banner 'logo
dashboard-projects-backend 'projectile
dashboard-items '((projects . 5)
(recents . 5)
(agenda . 5 )))
(dashboard-setup-startup-hook))
#+end_src
When running in *daemon* mode, ensure that the dashboard is the initial buffer.