From d6a343934124318457c375129138e23306671363 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Sat, 27 Apr 2024 19:29:21 +1200 Subject: [PATCH] emacs: re-enable electric-indent-mode --- .emacs.d/init.el | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4bb1f74..ecb63b1 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -52,8 +52,6 @@ One will be created if none exist." ;; hooks (defun indent-common-hook () - ;; turn off smart indent - (electric-indent-mode -1) ;; set indent width to 4 spaces (setq tab-width 4 c-basic-offset 4 @@ -264,6 +262,34 @@ One will be created if none exist." " " (:eval (breadcrumb-project-crumbs)) " : " (:eval (breadcrumb-imenu-crumbs)))))) +;; dashboard +(package-install 'dashboard) + +(defun make-quote () + (interactive) + (let ((quotes + '("At its core is an interpreter for Emacs Lisp." + "\"only one segfault in the default install, in a heck of a long time!\"" + "Merely an interface to your code." + "M-x eglot" + "50 years and Dired is still the best file manager on the planet" + (concat "Welcome home, " user-login-name)))) + (nth (random (length quotes)) quotes))) + +(setq dashboard-banner-logo-title "Welcome to GNU Emacs, one component of the GNU/Linux operating system." + dashboard-startup-banner "~/pix/jemacs-book.png" + dashboard-center-content t + dashboard-vertically-center-content t + dashboard-items + '((bookmarks . 8) + (recents . 4)) + dashboard-footer-messages `(,(make-quote)) + initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name))) + +(add-hook 'after-init-hook 'dashboard-insert-startupify-lists) +(add-hook 'after-init-hook 'dashboard-initialize) +(dashboard-setup-startup-hook) + ;; misc ;; guess the major mode from file name