Skip to content

Latest commit

 

History

History
227 lines (192 loc) · 4.91 KB

general.org

File metadata and controls

227 lines (192 loc) · 4.91 KB

General Emacs Config

General config, this serves as a base to build upon using the modules in the module folder.

User Interface, Theming & Aesthetics

Dashboard

Add a fancy dashboard to the startup screen.

(use-package dashboard
:ensure t
:config
(dashboard-setup-startup-hook))

(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)

Vertico

Minimal completion UI.

(use-package vertico
  :ensure t
  :bind (:map vertico-map
		("C-j" . vertico-next)
		("C-k" . vertico-previous)
		("C-f" . vertico-exit)
		:map minibuffer-local-map
		("M-h" . backward-kill-word))
  :custom
  (vertico-cycle t)
  :init
  (vertico-mode))

(use-package savehist
  :init
  (savehist-mode))

(use-package marginalia
  :after vertico
  :ensure t
  :custom
  (marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil))
  (marginalia-max-relative-age 0)
  (marginalia-align 'right)
  :init
  (marginalia-mode))

Center the vertico frame in the middle of Emacs.

(use-package vertico-posframe
  :ensure t
  :init
  (vertico-posframe-mode))

Theme

Doom Themes

Use Gruvbox as the theme for the editor.

(use-package doom-themes 
   :ensure t)
(load-theme 'doom-gruvbox t)

Automatic Theme and Font

(use-package auto-dark
  :ensure t
  :custom
  (auto-dark-themes '((doom-gruvbox) (doom-gruvbox-light)))

  :hook
  (auto-dark-dark-mode
   . (lambda ()
	 ;; something to execute when dark mode is detected
	 (vertico-posframe-cleanup)
	 ))
  (auto-dark-light-mode
   . (lambda ()
	 ;; something to execute when dark mode is detected
	 (vertico-posframe-cleanup)
	 ))
  :init (auto-dark-mode))

Font

Use Iosevka as the font for Emacs.

;; (add-to-list 'default-frame-alist '(font . "Iosevka Fixed" ))
;; (set-face-attribute 'default t :font "Iosevka Fixed" )

Hide Scrollbar, Menubar, Titlebar & Toolbar

Hide UI elements to create a cleaner UI.

(tool-bar-mode -1)
(menu-bar-mode -1)
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
(add-to-list 'default-frame-alist '(ns-appearance . dark)) 
(setq ns-use-proxy-icon nil)
(setq default-frame-alist '((undecorated . t)))

(add-to-list 'default-frame-alist
	       '(vertical-scroll-bars . nil))

All The Icons

Improve visuals by adding icons.

(use-package all-the-icons 
  :ensure t)

(use-package all-the-icons-dired 
  :ensure t)

(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)

(use-package all-the-icons-ibuffer
  :ensure t
  :hook (ibuffer-mode . all-the-icons-ibuffer-mode))

Org Modern

use the org-modern package to improve the visual look of org-mode.

(use-package org-modern
	    :ensure t)
(global-org-modern-mode)

Add some padding to all frames.

Padding

(use-package spacious-padding
	    :ensure t)
(spacious-padding-mode t)

Evil (Vi emulation)

Add Vim keybinds.

(setq evil-want-keybinding nil)
(use-package evil
	  :ensure t)
(evil-mode 1)

(use-package evil-tutor 
     :ensure t)

(use-package evil-collection 
     :ensure t)

(evil-collection-init)

Minor useful packages, Custom bindings & Tweaks

Which key

(use-package which-key 
   :ensure t)
(which-key-mode)

Backup settings

(setq backup-directory-alist
     `(("." . ,(concat user-emacs-directory "backups"))))

No littering

Package

(use-package no-littering
   :ensure t)

Custom bindings

(global-set-key (kbd "C-c c") 'comment-or-uncomment-region)
(global-set-key (kbd "C-c e") 'org-edit-src-code)

Undo Tree

(use-package undo-tree 
     :ensure t)

Restart Emacs

(use-package restart-emacs
  :ensure t)

Perspective

(use-package perspective
  :ensure t  ; use `:straight t` if using straight.el!
  :bind ("C-x k" . persp-kill-buffer*)
  :bind ("C-x p" . persp-switch)
  :custom (persp-mode-prefix-key (kbd "C-x m"))  ; pick your own prefix key here
  :init
  (persp-mode))

Project Management

(use-package projectile
  :ensure t)

Superstar

(use-package org-superstar
  :ensure t)
(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))
;; (when (display-graphic-p)
;;   (scroll-bar-mode -1))