71 lines
1.9 KiB
EmacsLisp
71 lines
1.9 KiB
EmacsLisp
|
|
;;
|
|
;; Set some defaults
|
|
;;
|
|
|
|
;; automatically revert buffers when they change on disk
|
|
(global-auto-revert-mode t)
|
|
;; display line numbers, TODO make this a config option for line number style
|
|
(global-display-line-numbers-mode 1)
|
|
;; set our default warning level to error
|
|
(setq warning-minimum-level :error)
|
|
;; set the default tab width to 2 spaces
|
|
(setq-default tab-width 2)
|
|
(setq tab-width 2)
|
|
(setq indent-tabs-mode 1)
|
|
;; Set the default help lines
|
|
(setq whomp-help-lines '("--------------"
|
|
"All W.H.O.M.P. commands will start with 'C-c w'"
|
|
""
|
|
"Welcome to the W.H.O.M.P. Emacs Dashboard"))
|
|
|
|
|
|
;;
|
|
;; Golden Ratio Mode helps with window sizing, and is a default feature
|
|
;;
|
|
|
|
;; golden-ratio
|
|
;; (straight-use-package 'golden-ratio)
|
|
;; (golden-ratio-mode 1)
|
|
;; (setq golden-ratio-auto-scale t)
|
|
;; (message "Golden Ratio Mode Enabled")
|
|
|
|
;;
|
|
;; Set up the W.H.O.M.P. keybindings
|
|
;;
|
|
|
|
;; The W.H.O.M.P. Map
|
|
;; This is the base starting point for the W.H.O.M.P. keybindings
|
|
(define-prefix-command 'whomp-map)
|
|
(global-set-key (kbd "C-c w") 'whomp-map)
|
|
|
|
;; Add a command to customize the W.H.O.M.P. group
|
|
(whomp/add-key-binding
|
|
"C-c"
|
|
(lambda () (interactive) (customize-group 'whomp-config))
|
|
"Customize this W.H.O.M.P. Emacs Installation")
|
|
|
|
;; quick commenting/uncommenting of a region is just too useful
|
|
(whomp/add-key-binding "c" 'comment-or-uncomment-region "Comment or uncomment region")
|
|
|
|
;; eval buffer is also very useful
|
|
(whomp/add-key-binding "e b" 'eval-buffer "Eval buffer")
|
|
|
|
(straight-use-package 'yasnippet)
|
|
(require 'yasnippet)
|
|
(setq yas-snippet-dirs '("~/.emacs.d/snippets"))
|
|
(message "Yasnippet loaded")
|
|
|
|
(straight-use-package 'yasnippet-snippets)
|
|
(require 'yasnippet-snippets)
|
|
(yas-reload-all)
|
|
(yas-global-mode 1)
|
|
(message "Yasnippet-Snippets loaded")
|
|
|
|
;; yasnippet stuff
|
|
(whomp/add-key-binding "y n" 'yas-new-snippet "Create a new yasnippet")
|
|
|
|
(message "W.H.O.M.P. Defaults Loaded")
|
|
;; our provide statement
|
|
(provide 'whomp-defaults)
|