2022-11-12 17:53:29 +00:00
|
|
|
;; This file customizes Emacs' editor
|
2022-11-08 17:53:06 +00:00
|
|
|
|
2022-11-08 17:53:07 +00:00
|
|
|
;; Quit input dialogues after pressing escape once
|
|
|
|
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
|
|
|
|
2022-11-13 18:41:10 +00:00
|
|
|
; Line Wrapping
|
2022-11-08 22:05:28 +00:00
|
|
|
(global-visual-line-mode 1) ; Prevent wrapping of words
|
|
|
|
|
2022-11-12 20:44:43 +00:00
|
|
|
;; evil - A Vi Layer inside of Emacs
|
2022-11-08 17:53:07 +00:00
|
|
|
(use-package evil
|
2022-11-08 22:05:28 +00:00
|
|
|
:custom
|
2022-11-09 18:04:45 +00:00
|
|
|
(evil-want-keybinding nil) ; Make room for evil-collection
|
2022-11-08 22:05:28 +00:00
|
|
|
(evil-want-integration t) ; Same as above
|
|
|
|
(evil-undo-system 'undo-fu) ; Set the undo/redo system
|
2022-11-13 16:46:40 +00:00
|
|
|
(evil-respect-visual-line-mode t) ; Make evil respect line wrapping
|
2022-11-08 17:53:07 +00:00
|
|
|
:config
|
|
|
|
(evil-mode 1))
|
|
|
|
|
2022-11-09 18:04:45 +00:00
|
|
|
;; evil-collection - A collection of keybinds for evil
|
|
|
|
(use-package evil-collection
|
|
|
|
:custom (evil-collection-setup-minibuffer t)
|
|
|
|
:init (evil-collection-init))
|
|
|
|
|
|
|
|
;; evil-escape - Escape from insert mode using jk
|
|
|
|
(use-package evil-escape
|
|
|
|
:config
|
|
|
|
(setq-default evil-escape-key-sequence "jk")
|
|
|
|
:init
|
|
|
|
(evil-escape-mode 1))
|
|
|
|
|
2022-11-08 17:53:07 +00:00
|
|
|
;; undo-fu, used by evil for undo/redo functionality
|
|
|
|
(use-package undo-fu)
|
2022-11-08 17:53:07 +00:00
|
|
|
|
2022-11-08 17:53:07 +00:00
|
|
|
;; Disable the creation of files ending with '~' (backup files)
|
|
|
|
(setq make-backup-files nil)
|
|
|
|
|
2022-11-12 17:38:40 +00:00
|
|
|
;; Move files with '#' to system tmp directory
|
2022-11-12 13:03:29 +00:00
|
|
|
(setq create-lockfiles nil)
|
2022-11-12 17:38:40 +00:00
|
|
|
(setq backup-directory-alist
|
|
|
|
`((".*" . ,temporary-file-directory)))
|
|
|
|
(setq auto-save-file-name-transforms
|
|
|
|
`((".*" ,temporary-file-directory t)))
|
2022-11-12 13:03:29 +00:00
|
|
|
|
2022-11-12 20:44:43 +00:00
|
|
|
;; Themes
|
2022-11-08 17:53:07 +00:00
|
|
|
;; Customize doom-themes
|
|
|
|
(setq doom-themes-enable-bold t
|
|
|
|
doom-themes-enable-italic t)
|
|
|
|
(doom-themes-treemacs-config) ; Enable theming of treemacs
|
|
|
|
(doom-themes-org-config) ; And org-mode
|
|
|
|
|
|
|
|
;; Set theme to doom-tokyo-night, Dianicemacs' default
|
|
|
|
(load-theme 'doom-tokyo-night t)
|
2022-11-08 17:53:06 +00:00
|
|
|
|
2022-11-12 20:44:43 +00:00
|
|
|
;; rainbow-mode - Colourful colour codes!
|
|
|
|
(use-package rainbow-mode
|
|
|
|
:hook (prog-mode . rainbow-mode))
|
|
|
|
|
|
|
|
;; Keybinds
|
2022-11-08 17:53:07 +00:00
|
|
|
;; Enable which-key
|
|
|
|
(which-key-mode)
|
|
|
|
(setq which-key-idle-delay 0.1) ; Make the popup appear faster
|
|
|
|
(setq which-key-separator " - " ) ; Change the seperator which-key uses
|
|
|
|
|
2022-11-08 22:05:28 +00:00
|
|
|
;; general - More convenient key definitions for Emacs
|
|
|
|
(use-package general
|
|
|
|
:config
|
|
|
|
(general-evil-setup t)
|
|
|
|
:init
|
|
|
|
(general-create-definer diancite/leaders
|
2022-11-14 21:24:46 +00:00
|
|
|
:prefix leader-key))
|
2022-11-08 22:05:28 +00:00
|
|
|
|
|
|
|
(diancite/leaders
|
|
|
|
:keymaps 'normal
|
2022-11-09 07:02:57 +00:00
|
|
|
"f" '(:wk "File")
|
|
|
|
"n" '(:wk "Org")
|
|
|
|
"m" '(:wk "Magit")
|
|
|
|
"w" '(:wk "Evil")
|
|
|
|
"p" '(:wk "Projects"))
|