                 (package-reinstall package-name))
         (warn "Package %s failed to reinstall" package-name)))))
 
-;;; Basics
+;; From https://github.com/daviwil/emacs-from-scratch/blob/master/init.el
+(defun icot/display-startup-time ()
+  (message "Emacs loaded in %s with %d garbage collections."
+           (format "%.2f seconds"
+                   (float-time
+                     (time-subtract after-init-time before-init-time)))
+           gcs-done))
+
+(add-hook 'emacs-startup-hook #'icot/display-startup-time)
+
+;;; Basics: Native compilation
 (setq package-native-compile t)
 (setq comp-deferred-compilation t)
 (setq load-prefer-newer t)

  :hook
  (embark-collect-mode . consult-preview-at-point-mode))

;;; Reset gc-cons-threshold
(setq gc-cons-threshold (* 2 1000 1000))
;;; init.el ends here

  (auto-compile-on-load-mode)
  (auto-compile-on-save-mode))

;; Theme, GUI

;; Disable menu bar and scroll bar
(setq inhibit-startup-screen t)

(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(set-fringe-mode 10)

(global-prettify-symbols-mode 1)

(add-hook 'after-init-hook (lambda () (load-theme 'modus-operandi)))

;; modus theme customizations
(setq modus-themes-hl-line '(intense accented))
(setq modus-themes-org-blocks 'gray-background)
(setq modus-themes-mode-line '(borderless))

;(setq modus-themes-syntax '(alt-syntax))
(setq modus-themes-bold-constructs t)
(setq modus-themes-italic-constructs t)

(set-face-attribute 'default nil :height 120)


;;; Help, Completion

;; marginalia
(use-package marginalia
  ;; Either bind `marginalia-cycle` globally or only in the minibuffer
  :bind (("M-A" . marginalia-cycle)
