diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | README.md | 33 | ||||
-rw-r--r-- | early-init.el | 14 | ||||
-rw-r--r-- | init.el | 96 |
4 files changed, 143 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4fd8c69 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/.cache/ +/eln-cache/ +/elpa/ +/history diff --git a/README.md b/README.md new file mode 100644 index 0000000..1d7fa3f --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Bedrock + +Stepping stones to a better Emacs experience + +## Synopsis + +An *extremely* minimal Emacs starter kit uses *no* external packages by default, and only ELPA packages on an opt-in basis. Intended to be copied once and then modified as the user grows in knowledge and power. + +## Description + +This is a minimal Emacs starter kit. Like, *really* minimal. Here's the short of the philosophy: + + - Focus on using default, built-in Emacs behavior + + Yes, we all love our fancy third-party packages. This starter kit focuses on what is built-in to Emacs. Why? Because there are too many good packages and picking and choosing the best is a joy we leave to the user. + + - Explain every customization + + The goal of this starter kit is to encourage end-user adaptation and growth. All of the `.el` files should be legible and, more importantly, justify in plain English the rationale for adding the configuration they do. + + - No magic + + We keep things *crushingly* simple here. That means no fancy loadable modules or whatnot. Everything is as straight-forward as can be. + +## Requirements + +Emacs 29.1 or later. + +Yes, as of writing, Emacs 29.1 hasn't been released yet. The reason why is because we are relying on `use-pacakge` to be built-in. + +## Authors + + - Ashton Wiersdorf diff --git a/early-init.el b/early-init.el index f567fcb..35e1be5 100644 --- a/early-init.el +++ b/early-init.el @@ -1,6 +1,7 @@ ;;; Basic settings for speed and convenience (setq gc-cons-threshold 100000000) (setq byte-compile-warnings '(not obsolete)) +(setq warning-suppress-log-types '((comp))) (setq bidi-inhibit-bpa t) ; turn this off if you need right-to-left text (setq x-underline-at-descent-line nil) (setq line-number-mode t) @@ -24,9 +25,12 @@ (setq mouse-wheel-flip-direction t) ;; minibuffer/completion +;; https://www.masteringemacs.org/article/understanding-minibuffer-completion (setq enable-recursive-minibuffers t) (setq completion-cycle-threshold 1) +(setq completions-detailed t) (setq tab-always-indent 'complete) +(define-key minibuffer-mode-map (kbd "TAB") 'minibuffer-complete) ;;; Enable/disable various modes (blink-cursor-mode -1) @@ -34,10 +38,10 @@ (savehist-mode) (global-auto-revert-mode) (pixel-scroll-precision-mode) +(global-hl-line-mode) ;; Silence stupid startup message -(put 'inhibit-startup-echo-area-message 'saved-value - (setq inhibit-startup-echo-area-message (user-login-name))) +(setq inhibit-startup-echo-area-message (user-login-name)) ;;; tab-bar config: always show, put time in tab-bar (setq tab-bar-show 0) ; Always show tab bar @@ -60,3 +64,9 @@ ;; Use this if you like light mode ;(load-theme 'modus-operandi) +;;; Completion +(fido-vertical-mode) +(setq completion-styles '(initials flex)) + +;;; Line numbers +(add-hook 'prog-mode-hook 'display-line-numbers-mode) @@ -1,2 +1,94 @@ -(fido-vertical-mode) -(setq completion-styles '(flex)) +;;; Basic packages to improve life + +;;; Navigation +(use-package avy + :ensure t + :bind (("C-c j" . avy-goto-line) + ("s-j" . avy-goto-char-timer))) + +;;; Helps +(use-package which-key + :ensure t + :config + (which-key-mode)) + +;;; Minibuffer and completion + +;; Vertico: better vertical completion for minibuffer commands +(use-package vertico + :ensure t + :init + (fido-mode -1) + (vertico-mode)) + +;; Marginalia: annotations for minibuffer +(use-package marginalia + :ensure t + :config + (marginalia-mode)) + +;; Popup completion-at-point +(use-package corfu + :ensure t + :config + (global-corfu-mode)) + +;; Part of corfu +(use-package corfu-popupinfo + :after corfu + :hook (corfu-mode . corfu-popupinfo-mode) + :bind (:map corfu-map + ("M-h" . corfu-popupinfo-toggle) + ("M-k" . corfu-popupinfo-scroll-down) + ("M-j" . corfu-popupinfo-scroll-up)) + :custom + (corfu-popupinfo-delay '(0.25 . 0.1)) + (corfu-popupinfo-hide nil) + :config + (corfu-popupinfo-mode)) + +;; Make corfu popup come up in terminal overlay +(use-package corfu-terminal + :if (not (display-graphic-p)) + :ensure t + :config + (corfu-terminal-mode)) + +;; Pretty icons for corfu +(use-package kind-icon + :ensure t + :after corfu + :config + (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)) + +;; Consult: Misc. enhanced commands +(use-package consult + :ensure t + :bind ( + ("C-x b" . consult-buffer) ;; orig. switch-to-buffer + ("M-y" . consult-yank-pop) ;; orig. yank-pop + ("C-s" . consult-line) ;; orig. isearch + )) + +;; Orderless: powerful completion style +(use-package orderless + :ensure t + :config + (setq completion-styles '(orderless))) + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages + '(corfu-terminal consult corfu orderless marginalia vertico))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) + +;; Fire up the help buffer +(help-quick) |