@ -130,313 +130,146 @@ Here's a complete list of all of the options configurable for each host, and the
(when (file-exists-p mod-file)
(when (file-exists-p mod-file)
(org-babel-load-file mod-file))))
(org-babel-load-file mod-file))))
#+end_src
#+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.
*** HTTP
# #+begin_example
# 5:
# 4:
# 3:
# 2:
# 1:
# 156: << CURRENT LINE >>
# 1:
# 2:
# 3:
# 4:
# 5:
# #+end_example
Instead of the popular =restclient= package, I use [[https://github.com/zweifisch/ob-http][ob-http]] as a lightweight alternative.
#+begin_src emacs-lisp
(use-package ob-http
:after org
:config (org-babel-do-load-languages
'org-babel-load-languages
'((http . t))))
#+end_src
*** C/C++
#+ATTR_ORG: :width 420px
#+ATTR_HTML: :width 420px
#+ATTR_LATEX: :width 420px
[[./docs/images/2021-02-13-example-ccls.gif]]
Add support for C/C++ languages.
+ Configure the [[https://github.com/MaskRay/ccls][ccls]] language server
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
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
:custom (doom-modeline-height 16)
:config (doom-modeline-mode 1))
#+end_src
Load a theme with =SPC t t=.
#+begin_src emacs-lisp
(dotfiles/leader
"tt" '(counsel-load-theme t t :which-key "Theme"))
#+end_src
** Pretty
Make programming buffers prettier with [[https://github.com/pretty-mode/pretty-mode][pretty-mode]], complimentary to the built in ~prettify-symbols-mode~.
#+begin_src emacs-lisp
(use-package pretty-mode
:hook (python-mode . turn-on-pretty-mode))
#+end_src
** Ligatures
Enable font ligatures via [[https://github.com/jming422/fira-code-mode][fira-code-mode]], perform this action *only* when ~Fira Code~ is the current font.
# 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
# :custom (doom-modeline-height 16)
# :config (doom-modeline-mode 1))
# #+end_src
# Load a theme with =SPC t t=.
# #+begin_src emacs-lisp
# (dotfiles/leader
# "tt" '(counsel-load-theme t t :which-key "Theme"))
# #+end_src
# ** Pretty
# Make programming buffers prettier with [[https://github.com/pretty-mode/pretty-mode][pretty-mode]], complimentary to the built in ~prettify-symbols-mode~.
# #+begin_src emacs-lisp
# (use-package pretty-mode
# :hook (python-mode . turn-on-pretty-mode))
# #+end_src
# ** Ligatures
# Enable font ligatures via [[https://github.com/jming422/fira-code-mode][fira-code-mode]], perform this action *only* when ~Fira Code~ is the current font.
There's a lot of occasions Emacs asks to input text to match a file name in a directory, just one example of an oppertunity for a completion system. *Swiper*[fn:1] is a family of packages that work towards this common goal in Emacs.
** Selection menu
*Ivy*[fn:1] is a powerful selection menu for Emacs.
#+begin_src emacs-lisp
(use-package ivy
:diminish
:config (ivy-mode 1))
#+end_src
** Replace built in commands
*Counsel*[fn:1] is a customized set of commands to replace built in completion buffers.