;;; fundamental.el --- Base mode of all other major modes -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: (defun user--fundamental-mode-hook () "Fundamental mode hook." (with-feature 'undo-tree (undo-tree-mode t)) (auto-fill-mode t) ;; Enable whitespace mode globally. ;;(whitespace-mode t) (with-feature 'rainbow-delimiters (rainbow-delimiters-mode t)) ;; Enable dtrt-indent to attempt to identify the indentation rules used. (with-eval-after-load 'dtrt-indent (dtrt-indent-mode t)) ;;; (Bindings) ;;; (user/bind-key-local :code :align 'align-current) (when (feature-p 'helm) (user/bind-key-local :nav :functions/toc 'helm-imenu))) (defun user--fundamental-mode-config () "Initialize Emacs fundamental mode." (validate-setq ;; When using fill-paragraph or auto-fill-mode break lines at 80 characters by ;; default. fill-column 120) ;;; (Packages) ;;; ;;; https://github.com/Fanael/rainbow-delimiters (use-package rainbow-delimiters :ensure t) ;; https://www.emacswiki.org/emacs/MicParen (use-package mic-paren :ensure t :config (paren-activate)) ;; https://github.com/Lindydancer/dynamic-spaces (use-package dynamic-spaces :disabled :config (dynamic-spaces-global-mode t)) ;; https://github.com/terlar/indent-info.el (use-package indent-info :ensure t :config (global-indent-info-mode t)) ;; https://github.com/shawcm/goldendict-emacs (use-package goldendict :disabled :if (executable-find "goldendict") :bind-wrap ((:key :doc :dictionary) . goldendict-dwim)) ;; https://www.emacswiki.org/emacs/FillAdapt (use-package filladapt :disabled) ;; https://github.com/fritzgrabo/cascading-dir-locals ;; Emacs: Apply all (!) .dir-locals.el from root to current directory. (use-package cascading-dir-locals :ensure t :config (cascading-dir-locals-mode 1))) (user--fundamental-mode-config) (provide 'modes/fundamental) ;;; fundamental.el ends here