I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

7.1 KiB

Interface

/chris/dotfiles/src/commit/95e5ba05d8d782407e50d03b3a4117c5b31a759c/docs/images/what-is-emacs-teaser.png

Bring Emacs out of the eighties

Menu completion

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. Swiper1 is a family of packages that work towards this common goal in Emacs.

Selection menu

Ivy1 is a powerful selection menu for Emacs.

(use-package ivy
  :diminish
  :config (ivy-mode 1))

Popup selection frame

  • Display ivy completions in a popup buffer

  • Set parent-frame to nil for Desktop support

(use-package ivy-posframe
  :after ivy
  :when (window-system)
  :custom (ivy-posframe-display-functions-alist '((t . ivy-posframe-display)))
          (ivy-posframe-parameters '((parent-frame nil)))
  :config (ivy-posframe-mode 1))

Replace built in commands

Counsel1 is a customized set of commands to replace built in completion buffers.

(use-package counsel
  :after ivy
  :custom (counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only)
  :config (counsel-mode 1))

Switch buffers with ,

Cherry picked from doom.

(dotfiles/leader
  "," '(counsel-switch-buffer :which-key "Buffers"))

Additional details

Provide more information about each item in the completion menu with Ivy rich2.

(use-package ivy-rich
  :after counsel
  :init (ivy-rich-mode 1))

Unified fonts

Write out to all of Emacs' available font faces with the unified font defined in the options.

(set-face-attribute 'default nil :font dotfiles/font :height dotfiles/font-size)
(set-face-attribute 'fixed-pitch nil :font dotfiles/font :height dotfiles/font-size)
(set-face-attribute 'variable-pitch nil :font dotfiles/font :height dotfiles/font-size)

Text scaling

Define a transient keybinding for Scaling the text.

(defhydra hydra-text-scale (:timeout 4)
  "Scale"
  ("j" text-scale-increase "Increase")
  ("k" text-scale-decrease "Decrease")
  ("f" nil "Finished" :exit t))
  • Scale the text inside of buffers with SPC t f

    • Increase j

    • Decrease k

    • Finished f

(dotfiles/leader
  "tf" '(hydra-text-scale/body :which-key "Font"))

Icon fonts

Dired feels more modern with prioritized icon fonts using All the Icons3. This makes navigation and visually parsing directories much faster, given that file types are quickly identified by their corresponding icons.

(use-package all-the-icons)

Integration with the All the Icons Dired4package.

(use-package all-the-icons-dired
  :hook (dired-mode . all-the-icons-dired-mode))

Symbols

Programming buffers made prettier with Pretty mode5, complimentary to the built-in Prettify symbols mode6.

(use-package pretty-mode
  :hook (python-mode . turn-on-pretty-mode))

Ligatures

Enable font ligatures via Fira Code mode7.

  • Perform when Fira Code is the current font

  • Don't enable on TTY

(use-package fira-code-mode
  :when (and (window-system)
             (equal dotfiles/font "Fira Code"))
  :hook (prog-mode org-mode))

Toggle global ligature mode with SPC t g.

(dotfiles/leader
  "tg" '(global-fira-code-mode :which-key "Ligatures"))

Emojification

Gotta have those emojis, first class support for Emacs via the Emacs-emojify8 package.

(use-package emojify
  :when (window-system)
  :hook (after-init . global-emojify-mode))
  • Place Emojify8 bindings behind SPC f

    • List with l

    • Search with s

    • Insert with i

    • Describe with d

(dotfiles/leader
  "f" '(:ignore t :which-key "Emojify")
  "fl" '(emojify-list-emojis :which-key "List")
  "fs" '(emojify-apropos-emoji :which-key "Search")
  "fi" '(emojify-insert-emoji :which-key "Insert")
  "fd" '(emojify-describe-emoji :which-key "Describe"))

Modern themes

/chris/dotfiles/src/commit/95e5ba05d8d782407e50d03b3a4117c5b31a759c/docs/images/what-is-emacs-customizable.gif

High quality and modern colour themes are provided in the Doom Themes9 package.

(use-package doom-themes
  :init (load-theme 'doom-moonlight t))

Load a theme with SPC t t.

(dotfiles/leader
  "tt" '(counsel-load-theme t t :which-key "Theme"))

Status bar

Doom modeline10 provides an elegant and modern status bar / modeline.

(use-package doom-modeline
  :custom (doom-modeline-height 16)
  :config (doom-modeline-mode 1))

Line numbering

Relative line numbers are important when using VI emulation keys. You can prefix commands with a number, allowing you to perform that action that number of times. Useful when navigating around pages that are hundreds, or even thousands of lines long.

  5:
  4:
  3:
  2:
  1:
156: << CURRENT LINE >>
  1:
  2:
  3:
  4:
  5:
(use-package linum-relative
  :commands (linum-relative-global-mode)
  :custom (linum-delay t)
          (linum-relative-backend 'display-line-numbers-mode))

Toggle line numbers with SPC t l.

(dotfiles/leader
  "tl" '(linum-relative-global-mode :which-key "Lines"))

Parenthesis

Colourize nested parenthesis with Rainbow delimeters11.

(use-package rainbow-delimiters
  :hook (prog-mode . rainbow-delimiters-mode))

Superstar

Make headline stars super with Org superstar mode12.

(use-package org-superstar
  :when (window-system)
  :after org
  :hook (org-mode . org-superstar-mode))

Resources