;;; shoshimacs.el --- Beginner's Mind Config -*- lexical-binding:t -*- ;;; Package Management (when (< emacs-major-version 28) (package-initialize) (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/")) (package-refresh-contents)) (when (and (functionp #'native-comp-available-p) (native-comp-available-p)) (setq native-comp-always-compile t package-native-compile t)) ;;; Major Keybinding ;; these need to be set before requiring the package (setq xah-fly-use-control-key nil xah-fly-use-meta-key nil) (package-install 'xah-fly-keys) (require 'xah-fly-keys) (xah-fly-keys-set-layout "qwerty") (xah-fly-keys t) (define-key 'xah-fly-leader-key-map (kbd "1") #'delete-other-windows) ;;; Completion (setq completion-styles '(flex basic partial-completion emacs22) completion-cycle-threshold 3 tab-always-indent 'complete) (package-install 'consult) (global-set-key (kbd "C-x b") #'consult-buffer) (define-key xah-fly-leader-key-map (kbd "f") #'consult-buffer) (define-key xah-fly-command-map (kbd "n") #'consult-line) (with-eval-after-load 'consult (consult-customize consult-theme :preview-key '(:debounce 0.5 any))) (package-install 'embark) (package-install 'marginalia) (marginalia-mode) (package-install 'vertico) (setq minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)) (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) (setq read-extended-command-predicate #'command-completion-default-include-p) (setq enable-recursive-minibuffers t) (vertico-mode) (require 'vertico-directory) (define-key vertico-map (kbd "RET") #'vertico-directory-enter) (define-key vertico-map (kbd "DEL") #'vertico-directory-delete-char) (define-key vertico-map (kbd "M-DEL") #'vertico-directory-delete-word) (define-key vertico-map (kbd "M-j") #'vertico-quick-insert) (package-install 'corfu) (setq corfu-auto t corfu-cycle t corfu-quit-no-match t) (global-corfu-mode t) (package-install 'corfu-terminal) (unless (display-graphic-p) (corfu-terminal-mode +1)) (package-install 'which-key) (which-key-mode) ;;; Editing (electric-pair-mode) (package-install 'markdown-mode) (defun my-org-top-level-heading () (interactive) (let ((moo 1)) (while moo (setq moo (org-up-heading-safe))))) (package-install 'htmlize) (recentf-mode) ;;; Programming (package-install 'sly) (package-install 'json-mode) (package-install 'devdocs) ;;; Projects (package-install 'magit) ;;; External Services (package-install 'plz) (package-install 'srht) (setq srht-username "shoshin") ;;; User Interface (when (display-graphic-p) (scroll-bar-mode -1) (fringe-mode '(8 . 0))) (tab-bar-mode t) (display-battery-mode t) (package-install 'darkroom) (set-frame-font "Victor Mono") (global-hl-line-mode t) (defvar my-themes-to-install '(cyberpunk-theme dracula-theme nano-theme) "List of themes to install when loading shoshimacs config.") (mapc #'package-install my-themes-to-install) (defvar my-chosen-themes '(cyberpunk dracula leuven modus-operandi modus-vivendi nano-dark nano-light tango tango-dark) "List of themes I prefer for narrowing and random selection.") (load-theme (seq-random-elt my-chosen-themes)) (package-install 'windresize)