nixos/home/emacs/modules/custom-defaults-config.el
Evie Litherland-Smith 6f04773670 Add doom-modeline, nerd-icons for dired, completion, etc...
Change some keymaps that didn't need to be hydras into regular keymaps

Misc formatting of module files to be a bit easier to read/understand
2023-10-29 07:00:48 +00:00

41 lines
1.3 KiB
EmacsLisp

;;; custom-defaults-config.el -*- lexical-binding: t; -*-
;;; Code:
(setq load-prefer-newer t
indent-tabs-mode nil
global-auto-revert-non-file-buffers t
dired-auto-revert-buffer t
dired-dwim-target t
tab-always-indent 'complete
completion-cycle-threshold 3
completions-detailed t
xref-show-definitions-function #'xref-show-definitions-completing-read
kill-do-not-save-duplicates t
auto-window-vscroll nil
fast-but-imprecise-scrolling t
scroll-conservatively 101
scroll-margin 0
scroll-preserve-screen-position 1)
(global-auto-revert-mode +1)
(delete-selection-mode)
;; Misc useful keymaps
(keymap-set global-map "M-#" #'dictionary-lookup-definition)
(keymap-set global-map "C-c r" #'recentf)
(keymap-set global-map "C-c b" #'ibuffer)
(keymap-set global-map "C-c p p" list-packages)
(keymap-set global-map "C-c p i" package-install)
(keymap-set global-map "C-c p d" package-delete)
;; turn on spell checking, if available.
(with-eval-after-load 'ispell
(when (executable-find ispell-program-name)
(add-hook 'text-mode-hook #'flyspell-mode)
(add-hook 'prog-mode-hook #'flyspell-prog-mode)))
;; Make shebang (#!) file executable when saved
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
(provide 'custom-defaults-config)