4.5 KiB
4.5 KiB
Looks
Font
(set-frame-font "FiraCode 16" nil t)
(set-fontset-font t '(#x1f000 . #x1faff) (font-spec :family "Myne Noto Color Emoji"))
Themes
(use-package afternoon-theme
:ensure t
:config
;;(load-theme 'afternoon t)
)
(use-package modus-themes
:ensure t
:config
(load-theme 'modus-operandi t)
)
UI
Split vertical defaul
(setq split-width-threshold nil)
Lines Numbers
(setq display-line-numbers 'relative)
(global-display-line-numbers-mode)
Dashboard
Set up some config functions
Configure layout
(defun setup-dashboard-looks ()
"Config ideas https://github.com/emacs-dashboard/emacs-dashboard"
(evil-define-key 'normal dashboard-mode-map (kbd "r") 'dashboard-section-1)
(evil-define-key 'normal dashboard-mode-map (kbd "J") 'dashboard-next-section)
(evil-define-key 'normal dashboard-mode-map (kbd "K") 'dashboard-previous-section)
(setq dashboard-startup-banner "~/.emacs.d/OnePiece.gif")
(setq dashboard-banner-logo-title "Lets get coddiinnngggg")
(setq dashboard-show-shortcuts t)
(setq dashboard-items '((recents . 5)
(projects . 5)))
(setq dashboard-item-names '(("Recent Files:" . "💫 Recent Files, probably not decent:")
("Projects:" . "Projects 🆓, probably also not decent:")))
;; Curently broken ☣️
(setq dashboard-center-content nil)
;;(setq dashboard-set-heading-icons t)
;;(setq dashboard-set-file-icons t)
(setq dashboard-footer-messages '("Sleepyyyyy 🥱"
"Uhhhh I am lost"
"🆓 Just go watch anime 🆓"
"Compiler Error ☣️ Upssss!"
"❤️ Its Coddiinnnng timee"))
)
Evil dashboard setup
(defun dashboard-load-function ()
(interactive)
(dashboard-next-section 1))
(defun evil-dashboard-setup ()
(setup-dashboard-looks)
(add-hook 'dashboard-mode-hook 'dashboard-load-function))
(use-package dashboard
:ensure t
:after (evil)
:config
(evil-dashboard-setup)
(dashboard-setup-startup-hook))
Ivy
(use-package ivy
:ensure t
:config
(ivy-mode))
Consel
(use-package counsel
:ensure t
:config
(counsel-mode))
Which key
(use-package which-key
:ensure t
:config
(which-key-mode))
Settings
Backup files
(setq
backup-directory-alist '(("." . "/tmp/"))
auto-save-file-name-transforms '((".*" "/tmp/" t)))
Evil
Base Functions
(defun my-evil-quit (old-fun &rest args)
(if (eq major-mode 'org-src-mode)
(org-edit-src-exit)
(apply old-fun args)))
(defun my-evil-save (old-fun &rest args)
(if (eq major-mode 'org-src-mode)
(org-edit-src-save)
(apply old-fun args)))
(advice-add #'evil-save :around #'my-evil-save)
(advice-add #'evil-quit :around #'my-evil-quit)
Base
Configure
(defun setup-evil-mode ()
(evil-define-key 'insert global-map (kbd "C-SPC") 'company-complete)
)
Install
(use-package evil
:ensure
:after (evil-leader)
:config
(setup-evil-mode)
(evil-mode 1))
Leader
(use-package evil-leader
:ensure t
:config
(global-evil-leader-mode)
; Set leader
(evil-leader/set-leader "<SPC>")
(evil-leader/set-key
"f" 'find-file
"g" 'magit
"d" 'dired
"c" '("config" . (keymap))
"cf" '("config file" . (lambda ()(interactive) (find-file (expand-file-name "~/.emacs.d/settings.org")))))
(evil-leader/set-key-for-mode 'org-mode "is" 'org-insert-structure-template)
(evil-leader/set-key-for-mode 'org-mode "e" 'org-edit-src-code)
)
Org Mode
(use-package evil-org
:ensure t
:after (org evil)
:hook (org-mode . evil-org-mode))
Projects
Projectile
(use-package projectile
:ensure t
:config
(projectile-mode +1)
(define-key projectile-mode-map (kbd "C-p") 'projectile-command-map))
Magit
(use-package magit
:ensure t)
Auto complete
Company
(use-package company
:ensure t
:config
(global-company-mode))