feat: which-key

This commit is contained in:
Muhammad Nauman Raza 2022-11-08 17:53:07 +00:00
parent 1d384cb910
commit bcb6f7a1a3
No known key found for this signature in database
GPG key ID: A9A36C429C9CAE31
4 changed files with 39 additions and 9 deletions

11
init.el
View file

@ -24,13 +24,16 @@
(straight-use-package 'use-package) (straight-use-package 'use-package)
(setq straight-use-package-by-default t) (setq straight-use-package-by-default t)
;; Disable the creation of files ending with '~' ;; Always make sure packages are installed to the system
(setq make-backup-files nil) (setq use-package-always-ensure t)
;; Add external e-lisp files to the load-path
(add-to-list 'load-path (concat user-emacs-directory (add-to-list 'load-path (concat user-emacs-directory
(convert-standard-filename "lisp/"))) (convert-standard-filename "lisp/")))
(require 'interface) ;; Load the code of some external files
(require 'packages) (require 'packages)
(require 'org-mode) (require 'interface)
(require 'editor) (require 'editor)
(require 'org-mode)
(require 'performance)

View file

@ -1,10 +1,15 @@
;;; This file customizes Emacs' editor ;;; This file customizes Emacs' editor
;; Quit input dialogues after pressing escape once
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
;;; evil - A Vi Layer inside of Emacs ;;; evil - A Vi Layer inside of Emacs
(setq evil-undo-system 'undo-fu) ; Enable undo/redo functionality using undo-fu
(evil-collection-init) ; Enable the evil-collection keybinds (evil-collection-init) ; Enable the evil-collection keybinds
(evil-mode 1) ; Enable evil (evil-mode 1) ; Enable evil
;; Disable the creation of files ending with '~' (backup files)
(setq make-backup-files nil)
;;; Themes ;;; Themes
;; Customize doom-themes ;; Customize doom-themes
(setq doom-themes-enable-bold t (setq doom-themes-enable-bold t
@ -15,5 +20,11 @@
;; Set theme to doom-tokyo-night, Dianicemacs' default ;; Set theme to doom-tokyo-night, Dianicemacs' default
(load-theme 'doom-tokyo-night t) (load-theme 'doom-tokyo-night t)
;;; Keybinds
;; 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
;; Provide this file to init.el ;; Provide this file to init.el
(provide 'editor) (provide 'editor)

View file

@ -22,16 +22,20 @@
;;; evil - A Vi layer inside of Emacs ;;; evil - A Vi layer inside of Emacs
(use-package evil (use-package evil
:config :init
(setq evil-want-keybinding nil ; Make room for evil-collection (setq evil-want-keybinding nil ; Make room for evil-collection
evil-want-integration t) ; Same as above evil-want-integration t ; Same as above
:requires (undo-fu evil-collection)) evil-undo-system 'undo-fu)) ; Set the undo/redo system
;; A collection of keybinds for evil-mode ;; A collection of keybinds for evil-mode
(use-package evil-collection) (use-package evil-collection
:after evil) ; In order to recognize evil-want-... being set
;; undo-fu, used by evil for undo/redo functionality ;; undo-fu, used by evil for undo/redo functionality
(use-package undo-fu) (use-package undo-fu)
;;; Keybinds
(use-package which-key)
;; Provide this file to init.el ;; Provide this file to init.el
(provide 'packages) (provide 'packages)

12
lisp/performance.el Normal file
View file

@ -0,0 +1,12 @@
;;; This file improves the performance of Emacs, startup or otherwise
;; Reduce garbage collection at startup
(setq gc-cons-threshold most-positive-fixnum)
;; Lower threshold back to 8 MiB (default is 800kB)
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold (expt 2 23))))
;; Provide this file to init.el
(provide 'performance)