From b703e87a61331ab185a90dfd0a553687e92978d2 Mon Sep 17 00:00:00 2001 From: earnest ma Date: Sat, 10 Jul 2021 10:15:36 -0400 Subject: [PATCH] goodbye --- .config/emacs/config.el | 7 - .config/emacs/core/earnecore-display.el | 168 ------------------ .config/emacs/core/earnecore-editing.el | 71 -------- .config/emacs/core/earnecore-keybinds.el | 121 ------------- .config/emacs/core/earnecore-pkg.el | 50 ------ .config/emacs/core/earnecore-projects.el | 28 --- .config/emacs/core/earnecore-theme.el | 25 --- .config/emacs/core/earnemacs-main.el | 84 --------- .config/emacs/core/earnemacs-packages.el | 80 --------- .config/emacs/core/earnemacs-vars.el | 52 ------ .config/emacs/early-init.el | 43 ----- .config/emacs/init.el | 34 ---- .config/emacs/load.el | 38 ---- .config/emacs/modules/app/earnemod-elfeed.el | 84 --------- .config/emacs/modules/app/earnemod-gemini.el | 17 -- .config/emacs/modules/app/earnemod-org.el | 124 ------------- .../modules/completion/earnemod-company.el | 59 ------ .../emacs/modules/completion/earnemod-ivy.el | 22 --- .../emacs/modules/display/earnemod-focus.el | 14 -- .../modules/display/earnemod-scrolling.el | 14 -- .../emacs/modules/display/earnemod-window.el | 29 --- .../emacs/modules/editor/earnemod-check.el | 14 -- .../emacs/modules/editor/earnemod-docker.el | 18 -- .../modules/editor/earnemod-everywhere.el | 13 -- .config/emacs/modules/editor/earnemod-git.el | 50 ------ .config/emacs/modules/editor/earnemod-lsp.el | 29 --- .../emacs/modules/editor/earnemod-parens.el | 19 -- .config/emacs/modules/lang/earnemod-config.el | 39 ---- .config/emacs/modules/lang/earnemod-golang.el | 15 -- .../emacs/modules/lang/earnemod-markdown.el | 34 ---- .config/emacs/modules/lang/earnemod-python.el | 18 -- .config/emacs/modules/lang/earnemod-rust.el | 14 -- .config/emacs/modules/lang/earnemod-web.el | 16 -- .../modules/projects/earnemod-treemacs.el | 55 ------ .config/emacs/straight/versions/default.el | 101 ----------- .config/emacs/straight/versions/pinned.el | 2 - 36 files changed, 1601 deletions(-) delete mode 100644 .config/emacs/config.el delete mode 100644 .config/emacs/core/earnecore-display.el delete mode 100644 .config/emacs/core/earnecore-editing.el delete mode 100644 .config/emacs/core/earnecore-keybinds.el delete mode 100644 .config/emacs/core/earnecore-pkg.el delete mode 100644 .config/emacs/core/earnecore-projects.el delete mode 100644 .config/emacs/core/earnecore-theme.el delete mode 100644 .config/emacs/core/earnemacs-main.el delete mode 100644 .config/emacs/core/earnemacs-packages.el delete mode 100644 .config/emacs/core/earnemacs-vars.el delete mode 100644 .config/emacs/early-init.el delete mode 100644 .config/emacs/init.el delete mode 100644 .config/emacs/load.el delete mode 100644 .config/emacs/modules/app/earnemod-elfeed.el delete mode 100644 .config/emacs/modules/app/earnemod-gemini.el delete mode 100644 .config/emacs/modules/app/earnemod-org.el delete mode 100644 .config/emacs/modules/completion/earnemod-company.el delete mode 100644 .config/emacs/modules/completion/earnemod-ivy.el delete mode 100644 .config/emacs/modules/display/earnemod-focus.el delete mode 100644 .config/emacs/modules/display/earnemod-scrolling.el delete mode 100644 .config/emacs/modules/display/earnemod-window.el delete mode 100644 .config/emacs/modules/editor/earnemod-check.el delete mode 100644 .config/emacs/modules/editor/earnemod-docker.el delete mode 100644 .config/emacs/modules/editor/earnemod-everywhere.el delete mode 100644 .config/emacs/modules/editor/earnemod-git.el delete mode 100644 .config/emacs/modules/editor/earnemod-lsp.el delete mode 100644 .config/emacs/modules/editor/earnemod-parens.el delete mode 100644 .config/emacs/modules/lang/earnemod-config.el delete mode 100644 .config/emacs/modules/lang/earnemod-golang.el delete mode 100644 .config/emacs/modules/lang/earnemod-markdown.el delete mode 100644 .config/emacs/modules/lang/earnemod-python.el delete mode 100644 .config/emacs/modules/lang/earnemod-rust.el delete mode 100644 .config/emacs/modules/lang/earnemod-web.el delete mode 100644 .config/emacs/modules/projects/earnemod-treemacs.el delete mode 100644 .config/emacs/straight/versions/default.el delete mode 100644 .config/emacs/straight/versions/pinned.el diff --git a/.config/emacs/config.el b/.config/emacs/config.el deleted file mode 100644 index 051f92e..0000000 --- a/.config/emacs/config.el +++ /dev/null @@ -1,7 +0,0 @@ -(setq - user-full-name "earnest ma" - user-mail-address "me@earne.link" - - calendar-latitude 43.70011 - calendar-longitude -79.4163 -) diff --git a/.config/emacs/core/earnecore-display.el b/.config/emacs/core/earnecore-display.el deleted file mode 100644 index 1097c8c..0000000 --- a/.config/emacs/core/earnecore-display.el +++ /dev/null @@ -1,168 +0,0 @@ -;;; earnecore-display.el --- Display -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -;; Misc -(setq frame-title-format (list "%b %* " earnemacs-daemon-name "@" system-name) - truncate-string-ellipsis "…" - use-file-dialog nil - use-dialog-box nil) - -;; Show column number in modeline -(setq-default column-number-mode t) - -;; Font: More set below, this is just in case for the daemon -(add-to-list 'default-frame-alist '(font . "Fira Code 11")) - -;; Modeline -(use-package doom-modeline - :demand - :init (doom-modeline-mode 1) - :config - (display-time-mode 1) - (if (equal "Battery status not available" - (battery)) - () - (display-battery-mode 1))) - -;; Dashboard -(use-package dashboard - :demand - ;; Prevent issues when opening through Daemon - will see scratch buffer instead - :if (< (length command-line-args) 2) - - :config - (dashboard-setup-startup-hook) - - ;; Customizations - (setq dashboard-banner-logo-title "Welcome to earnemacs!") - (setq dashboard-startup-banner 'logo) - (setq dashboard-set-footer nil) - (setq dashboard-items - '((recents . 5) - (bookmarks . 5) - (agenda . 5) - (projects . 5)))) - -;; Tabs -(use-package tab-bar - :straight nil - :bind - (:map tab-prefix-map - ("n" . tab-next) - ("p" . tab-previous) - ("t" . tab-new) - ("x" . tab-close) - ("X" . tab-close-other) - ("C-x" . tab-bar-undo-close-tab)) - :general - (earnemacs-spc-def "T" '(:keymap tab-prefix-map :wk "Tab")) - :init - (tab-bar-mode)) - -;; Scrolling -(setq mouse-wheel-scroll-amount '(2 ((shift) . 1))) -(setq mouse-wheel-progressive-speed nil) -(setq mouse-wheel-follow-mouse 't) -(setq scroll-step 1) - -;; Frame opacity -(defun earnemacs-adjust-opacity (frame incr) - "Adjust the background opacity of FRAME by increment INCR. -From purcell/emacs.d" - (unless (display-graphic-p frame) - (error "Cannot adjust opacity of this frame")) - (let* ((oldalpha (or (frame-parameter frame 'alpha) 100)) - ;; The 'alpha frame param became a pair at some point in - ;; emacs 24.x, e.g. (100 100) - (oldalpha (if (listp oldalpha) (car oldalpha) oldalpha)) - (newalpha (+ incr oldalpha))) - (when (and (<= frame-alpha-lower-limit newalpha) (>= 100 newalpha)) - (modify-frame-parameters frame (list (cons 'alpha newalpha)))))) - -(earnemacs-spc-def - ;; Frame opacity keybindings - "t0" '(:def (lambda () (interactive) (modify-frame-parameters nil - `((alpha . 100)))) - :wk "Reset transparency") - "t-" '(:def (lambda () (interactive) (earnemacs-adjust-opacity nil -10)) - :wk "Decrease transparency") - "t=" '(:def (lambda () (interactive) (earnemacs-adjust-opacity nil 10)) - :wk "Increase transparency")) - - -;; Increase/ decrease font size -(defun font-name-replace-size (font-name new-size) - (let ((parts (split-string font-name "-"))) - (setcar (nthcdr 7 parts) (format "%d" new-size)) - (mapconcat 'identity parts "-"))) - -(defun increment-default-font-height (delta) - "Adjust the default font height by DELTA on every frame. -The pixel size of the frame is kept (approximately) the same. -DELTA should be a multiple of 10, in the units used by the -:height face attribute. From purcell/emacs.d" - (let* ((new-height (+ (face-attribute 'default :height) delta)) - (new-point-height (/ new-height 10))) - (dolist (f (frame-list)) - (with-selected-frame f - ;; Latest 'set-frame-font supports a "frames" arg, but - ;; we cater to Emacs 23 by looping instead. - (set-frame-font (font-name-replace-size (face-font 'default) - new-point-height) - t))) - (set-face-attribute 'default nil :height new-height) - (message "default font size is now %d" new-point-height))) - -;; Functions, keybindings for size -(defun increase-default-font-height () - (interactive) - (increment-default-font-height 10)) - -(defun decrease-default-font-height () - (interactive) - (increment-default-font-height -10)) - -(earnemacs-spc-def - ;; -/+ zooms in/out using `text-scale-...' - "z0" 'text-scale-adjust - "z-" 'text-scale-decrease - "z=" 'text-scale-increase - ;; Shift -/+ increases the default font height - "z+" 'increase-default-font-height - "z_" 'decrease-default-font-height) - -;; - -;; Setup font/ transparency/ display of frame -(defun earnemacs--frame-hook () - "Font and transparency settings. This is in a hook because Emacs doesn't -really like setting fonts/ transparency when run through a daemon." - (if (not (null earnemacs-transparent-frame)) - (modify-all-frames-parameters `((alpha . 95)))) - - (set-face-attribute 'default nil - :font "Fira Code" - :height earnemacs-default-face-height) - - (set-face-attribute 'fixed-pitch nil - :font "Fira Code" - :height earnemacs-fixed-face-height) - - (set-face-attribute 'variable-pitch nil - :font "FiraGO" - :height earnemacs-variable-face-height)) - -;; Run earnemacs--frame-hook, if daemon nothing will happen, but the hook will -;; set everything when it needs to. -(earnemacs--frame-hook) -(add-hook 'server-after-make-frame-hook 'earnemacs--frame-hook) - -;; Give focus when a new client frame is created -(add-hook 'server-after-make-frame-hook - (lambda () (select-frame-set-input-focus (selected-frame)))) - -(provide 'earnecore-display) -;;; earnecore-display.el ends here diff --git a/.config/emacs/core/earnecore-editing.el b/.config/emacs/core/earnecore-editing.el deleted file mode 100644 index a397474..0000000 --- a/.config/emacs/core/earnecore-editing.el +++ /dev/null @@ -1,71 +0,0 @@ -;;; earnecore-editing.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Commentary: - -;; - -;;; Code: -(use-package editorconfig - :demand - :config - (editorconfig-mode 1)) - -;; Improve performance for large files -(global-so-long-mode 1) - -;; Automatically revert buffers when changed on disk -(global-auto-revert-mode 1) - -;; Save and restore place in file -(save-place-mode +1) - -;; Auto-saving/ backup/ lockfiles -(use-package super-save - :demand - :config - (super-save-mode +1) - (setq super-save-auto-save-when-idle t) - (setq super-save-remote-files nil) - (setq super-save-exclude '(".gpg"))) - -(setq backup-by-copying t - delete-old-versions t - kept-new-versions 6 - kept-old-versions 2 - version-control t) - -;; crux (A Collection of Ridiculously Useful eXtensions for Emacs) -(use-package crux - :general - (earnemacs-spc-def - "fr" 'crux-sudo-edit)) - -;; "Paste menu" - taken and adapted with <3 from Doom Emacs -(defun earnemacs/paste () - "Interactively select what text to insert from the kill ring." - (interactive) - (call-interactively - (cond ((fboundp 'counsel-yank-pop) #'counsel-yank-pop) - ((error "No kill-ring search backend available."))))) -(earnemacs-spc-def "ip" 'earnemacs/paste) - -;; yes or no -> y or n -(fset 'yes-or-no-p 'y-or-n-p) - -;; Windows: open current directory in explorer.exe -(when *sys-windows* - (defun earnemacs/open-current-dir-in-explorer () - "Open the currently visited directory in Windows Explorer." - (interactive) - (shell-command "explorer.exe ."))) - -(setq delete-by-moving-to-trash t) - -(setq-default fill-column 80) - -(provide 'earnecore-editing) -;;; earnecore-editing.el ends here diff --git a/.config/emacs/core/earnecore-keybinds.el b/.config/emacs/core/earnecore-keybinds.el deleted file mode 100644 index bf703fa..0000000 --- a/.config/emacs/core/earnecore-keybinds.el +++ /dev/null @@ -1,121 +0,0 @@ -;;; earnecore-keybinds.el --- Evil mode and keys -*- lexical-binding: t; -*- - -;; Copyright (C) 2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(global-set-key (kbd "") 'keyboard-escape-quit) - -;; Evil -(use-package evil - :demand - :init - (setq evil-want-integration t) - (setq evil-want-keybinding nil) - (setq evil-want-fine-undo t) - :config - (evil-mode 1) - (setq evil-split-window-below t - evil-vsplit-window-right t) - (evil-ex-define-cmd "W" 'evil-write-all) - (evil-ex-define-cmd "Q" 'save-buffers-kill-emacs)) - -;; which-key -(use-package which-key - :demand - :config - (which-key-mode)) - -;; General -(use-package general - :demand - :config - (general-create-definer earnemacs-spc-def - :states '(normal emacs insert visual) - :prefix "SPC" - :non-normal-prefix "C-SPC") - - ;; Base SPC keybindings - (earnemacs-spc-def - "." 'find-file - ";" 'eval-expression - ":" 'shell-command - - "b" '(:wk "Buffer") - "be" 'eval-buffer - "bk" 'kill-buffer - "bK" 'kill-current-buffer - "br" 'revert-buffer - "bs" 'save-buffer - "bS" 'save-some-buffers - "bx" '(:def (lambda () (interactive) (switch-to-buffer "*scratch*")) - :wk "scratch buffer") - "bz" 'bury-buffer - "bZ" 'unbury-buffer - "b " 'switch-to-next-buffer - "b " 'switch-to-prev-buffer - - "c" '(:wk "Code") - - "f" '(:wk "File") - "ff" 'find-file - "fP" '(:def (lambda () (interactive) - (find-file (concat earnemacs-root-dir "config.el"))) - :wk "open config file") - "fs" 'save-buffer - "fS" '(:def (lambda () (interactive) (save-buffer "")) - :wk "save buffer as") - "fy" '(:def (lambda () (interactive) (kill-new buffer-file-name)) - :wk "kill path to buffer") - "fY" '(:def (lambda () (interactive) (kill-new default-directory)) - :wk "kill current dir path") - - "g" '(:wk "Git") - - "h" '(:keymap help-map :wk "Help") - - "i" '(:wk "Insert") - - "o" '(:wk "Open") - "oe" 'eshell - "of" 'make-frame-command - "oS" 'shell - - "q" '(:wk "Quit/Reload") - "qf" 'delete-frame - "qK" 'save-buffers-kill-emacs - "qq" 'save-buffers-kill-terminal - "qQ" 'evil-quit-all-with-error-code - - "t" '(:wk "Toggle") - "tf" 'toggle-frame-fullscreen - "tF" 'flycheck-mode - "tr" 'read-only-mode - "to" 'olivetti-mode - "tv" 'variable-pitch-mode - "tw" 'visual-line-mode - - "w" '(:wk "Window") - "w=" 'balance-windows - "w-" 'evil-window-decrease-height - "w+" 'evil-window-increase-height - "w<" 'evil-window-decrease-width - "w>" 'evil-window-increase-width - - "wh" 'evil-window-left - "wj" 'evil-window-down - "wk" 'evil-window-top - "wl" 'evil-window-right - - "wd" 'evil-window-delete - "wn" 'evil-window-new - "wq" 'evil-quit - "ww" 'evil-window-next - "wv" 'evil-window-vsplit - - "wt" 'tear-off-window - )) - -(provide 'earnecore-keybinds) -;;; earnecore-keybinds.el ends here diff --git a/.config/emacs/core/earnecore-pkg.el b/.config/emacs/core/earnecore-pkg.el deleted file mode 100644 index 72f0bcf..0000000 --- a/.config/emacs/core/earnecore-pkg.el +++ /dev/null @@ -1,50 +0,0 @@ -;;; earnecore-pkg.el --- Misc -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -;; Keep the emacs config directory clean -(use-package no-littering - :demand - :config - ;; Exclude directories from recentf - (with-eval-after-load 'recentf - (add-to-list 'recentf-exclude no-littering-etc-directory) - (add-to-list 'recentf-exclude no-littering-var-directory)) - - (setq ; save some files to different files for daemon(s) - recentf-save-file (concat no-littering-var-directory - "recentf-save-" earnemacs-daemon-name ".el") - bookmark-default-file (concat no-littering-var-directory - "bookmark-" earnemacs-daemon-name ".el") - projectile-cache-file (concat no-littering-var-directory - "projectile/cache-" earnemacs-daemon-name ".el") - projectile-known-projects-file (concat no-littering-var-directory - "projectile/known-projects-" - earnemacs-daemon-name ".el"))) - -;; Do not keep or load a custom file -(setq custom-file (expand-file-name - (format - "custom-%d-%d.el" (emacs-pid) (random)) - temporary-file-directory)) - -;; Native comp adjustments -(defun earnemacs--native-comp-adjustments () - "Adjustments when using Emacs built with native compilation." - (setq comp-async-report-warnings-errors nil)) - -(if (and (fboundp 'native-comp-available-p) - (native-comp-available-p)) - (earnemacs--native-comp-adjustments)) - -;; Inherit environment variables from shell -(use-package exec-path-from-shell - :if (or *sys-bsd* *sys-linux* *sys-mac*) - :init - (exec-path-from-shell-initialize)) - -(provide 'earnecore-pkg) -;;; earnecore-pkg.el ends here diff --git a/.config/emacs/core/earnecore-projects.el b/.config/emacs/core/earnecore-projects.el deleted file mode 100644 index b329268..0000000 --- a/.config/emacs/core/earnecore-projects.el +++ /dev/null @@ -1,28 +0,0 @@ -;;; earnecore-projects.el --- Project management -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Commentary: - -;; - -;;; Code: -(use-package projectile - :general - (general-def - :keymaps 'projectile-command-map "A" - 'projectile-add-known-project) - (earnemacs-spc-def - "SPC" 'projectile-find-file - "," 'projectile-switch-to-buffer - "p" '(:keymap projectile-command-map :package projectile :wk "Projectile")) - - :config - (projectile-mode +1) - (when (file-directory-p "~/ghq") - (setq projectile-project-search-path '("~/ghq")))) - -(provide 'earnecore-projects) -;;; earnecore-projects.el ends here diff --git a/.config/emacs/core/earnecore-theme.el b/.config/emacs/core/earnecore-theme.el deleted file mode 100644 index a3609c1..0000000 --- a/.config/emacs/core/earnecore-theme.el +++ /dev/null @@ -1,25 +0,0 @@ -;;; earnecore-theme.el --- Theme -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Commentary: - -;; - -;;; Code: -(defvar earnemacs-theme 'doom-dracula - "Theme to load. Change in load.el") - -(use-package doom-themes - :demand - :config - (doom-themes-visual-bell-config)) - -(use-package modus-themes) - -(load-theme earnemacs-theme t) - -(provide 'earnecore-theme) -;;; earnemod-base-theme.el ends here diff --git a/.config/emacs/core/earnemacs-main.el b/.config/emacs/core/earnemacs-main.el deleted file mode 100644 index 3ddcefe..0000000 --- a/.config/emacs/core/earnemacs-main.el +++ /dev/null @@ -1,84 +0,0 @@ -;;; earnemacs-main.el --- earnemacs -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Commentary: - -;; The main earnemacs file. - -;;; Code: - -;; Windows - $HOME folder if not set -(when (and *sys-windows* (null (getenv-internal "HOME"))) - (setenv "HOME" (getenv "USERPROFILE")) - (setq abbreviated-home-dir nil)) - -;; UTF-8, LF by default -(setq-default buffer-file-coding-system 'utf-8-unix) -(setq-default default-buffer-file-coding-system 'utf-8-unix) -(set-default-coding-systems 'utf-8-unix) -(prefer-coding-system 'utf-8-unix) - -;; Less noise on startup -(unless (daemonp) - (advice-add #'display-startup-echo-area-message :override #'ignore)) ; message -(setq inhibit-startup-screen t) ; startup buffer -(setq ad-redefinition-action 'accept) ; silence redefined warnings - -(setq server-use-tcp t) ; daemon: use tcp sockets file - -;; Add default modules to load path (modules/ recursively) -;; Taken with <3 from siren emacs: https://github.com/jimeh/.emacs.d -(defun siren-recursive-add-to-load-path (dir) - "Add DIR and all its sub-directories to `load-path'." - (add-to-list 'load-path dir) - (dolist (f (directory-files dir)) - (let ((name (expand-file-name f dir))) - (when (and (file-directory-p name) - (not (string-prefix-p "." f))) - (siren-recursive-add-to-load-path name))))) - -(siren-recursive-add-to-load-path earnemacs-modules-dir) - -;;; - - -(defun earnemacs+load () - "Function to finish loading earnemacs. - -earnemacs has already loaded earnemacs-var, -main, and -packages. -This function will load: - -- core modules (prefixed with `earnecore-') -- `pre-load.el' if it exists -- `load.el' -- `config.el'" - - (let* ((prel (concat earnemacs-root-dir "pre-load.el"))) - (if (file-exists-p prel) - (load-file prel))) - - ;; Load core modules - (require 'earnecore-theme) - (require 'earnecore-keybinds) - (require 'earnecore-display) - (require 'earnecore-pkg) - (require 'earnecore-projects) - (require 'earnecore-editing) - - (let* ((modules (concat earnemacs-root-dir "load.el"))) - (load modules nil t) - (dolist (module earnemacs-modules) - (require module))) - - (let* ((config (concat earnemacs-root-dir "config.el"))) - (load config nil t)) - - (setq earnemacs-initialized-p t)) - -;; Load everything! -(earnemacs+load) - -(provide 'earnemacs-main) -;;; earnemacs-main.el ends here diff --git a/.config/emacs/core/earnemacs-packages.el b/.config/emacs/core/earnemacs-packages.el deleted file mode 100644 index f20952d..0000000 --- a/.config/emacs/core/earnemacs-packages.el +++ /dev/null @@ -1,80 +0,0 @@ -;;; earnemacs-packages.el --- Package management -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Commentary: - -;; Bootstrap/ load and configure straight.el for package management. - -;;; Code: - -;; Profiles -(setq straight-profiles - '((nil . "default.el") - (pinned . "pinned.el"))) - -;; Use the develop branch of straight.el (for now), must set before bootstrap. -(setq straight-repository-branch "develop") - -;; Boostrap/ load straight.el -(defvar bootstrap-version) -(let ((bootstrap-file - (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) - (bootstrap-version 5)) - (unless (file-exists-p bootstrap-file) - (with-current-buffer - (url-retrieve-synchronously - "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" - 'silent 'inhibit-cookies) - (goto-char (point-max)) - (eval-print-last-sexp))) - (load bootstrap-file nil 'nomessage)) - -;; Configure straight -; (setq straight-vc-git-default-clone-depth 1) ; save space - -(setq straight-use-package-by-default t) ; use-package integration -(straight-use-package 'use-package) - -(setq use-package-always-defer t) ; always defer unless :demanded - -(require 'straight-x) ; load additional experimental commands - -;;; Modules system: - -(defvar earnemacs-modules nil - "A quoted list of optional modules to load. The default list is provided and -used form `load.template.el'. It should be checked after every major update to -earnemacs.") - -(defun earnemacs-update-packages () - "Update all packages (core/ module packages mostly will refer to pinned -lockfile unless no commit hash is provided) and write packages the user has -installed to the `default.el' lockfile." - (interactive) - - (message "[earnemacs] Updating packages and lockfiles...") - (straight-x-pull-all) - (straight-x-freeze-versions) - (message "[earnemacs] Update complete, consider reloading earnemacs.")) - -;;; Pin packages to a certain commit (for core/ module packages only): -;; Any core/module package not given a commit hash here will update -;; as normal, and no hash is written to `pinned.el'. - -(defmacro earnemacs-package-pin (package commit) - "Add the PACKAGE and COMMIT hash to the pinned lockfile. Aliased to `epin'. - -Ex: (epin \"packagename\" \"70b64b6d91d62ecef8fa202c65c19b8aba7122e2\") -Only for core/ optional modules. (for now?)" - - `(let ((straight-current-profile 'pinned)) - (add-to-list 'straight-x-pinned-packages - '(,package . ,commit)))) - -(defalias 'epin 'earnemacs-package-pin) - -(provide 'earnemacs-packages) -;;; earnemacs-packages.el ends here diff --git a/.config/emacs/core/earnemacs-vars.el b/.config/emacs/core/earnemacs-vars.el deleted file mode 100644 index b28f32b..0000000 --- a/.config/emacs/core/earnemacs-vars.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; earnemacs-vars.el --- Variables for earnemacs -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Commentary: - -;; This file defines variables for earnemacs. - -;;; Code: - -(defconst earnemacs-root-dir user-emacs-directory - "Typically the ~/.config/emacs or ~/.emacs.d directory earnemacs is being -loaded from, although this can differ if you are using chemacs2.") - -(defconst earnemacs-core-dir (concat earnemacs-root-dir "core/") - "Path to the earnemacs core directory.") - -(defconst earnemacs-modules-dir (concat earnemacs-root-dir "modules/") - "Path to the earnemacs modules directory.") - -(defvar earnemacs-initialized-p nil - "Non-nil if earnemacs has been initialized.") - -;; What OS are we using? -(defconst *sys-linux* (eq system-type 'gnu/linux)) -(defconst *sys-windows* (memq system-type '(windows-nt cygwin ms-dos))) -(defconst *sys-mac* (eq system-type 'darwin)) -(defconst *sys-bsd* (or *sys-mac* (eq system-type 'berkeley-unix))) - -;; Daemon identification -(cond ((eq (daemonp) nil) - (defconst earnemacs-daemon-name "indiv")) ; emacs - ((eq (daemonp) t) - (defconst earnemacs-daemon-name "daemon")) ; emacs --daemon - ((defconst earnemacs-daemon-name (daemonp)))) ; emacs --daemon="..." - -;; Config options that must be set very early - -(defvar earnemacs-default-face-height 110 - "If you want to adjust it, it must be done in `pre-load.el'.") -(defvar earnemacs-fixed-face-height 110 - "If you want to adjust it, it must be done in `pre-load.el'.") -(defvar earnemacs-variable-face-height 115 - "If you want to adjust it, it must be done in `pre-load.el'.") -(defvar earnemacs-transparent-frame t - "Enables a semi-transparent frame by default. Set to nil to disable in -`pre-load.el'.") - -(provide 'earnemacs-vars) -;;; earnemacs-vars.el ends here diff --git a/.config/emacs/early-init.el b/.config/emacs/early-init.el deleted file mode 100644 index 8760335..0000000 --- a/.config/emacs/early-init.el +++ /dev/null @@ -1,43 +0,0 @@ -;;; early-init.el --- Early initialization -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Commentary: - -;; This file is loaded before the main `init.el' initialization file and -;; graphical window. - -;;; Code: - -;; Garbage collection -(setq gc-cons-threshold most-positive-fixnum - gc-cons-percentage 0.6) - -(add-hook 'emacs-startup-hook - (lambda () - (setq gc-cons-threshold 16777216 - gc-cons-percentage 0.1))) - -;; Remove some graphical things -;; (if (not (eq system-type 'darwin)) (menu-bar-mode -1)) -(tool-bar-mode -1) -(scroll-bar-mode -1) ; no scroll bars at all - -;; Startup slightly faster even if frame is being resized on startup -(setq frame-inhibit-implied-resize t) - -;; Do NOT use package.el -(setq package-enable-at-startup nil) - -;; Silence "Package cl is deprecated" -;; AFAIK, cl was deprecated in Emacs 27.1 and replaced by cl-lib, -;; which some packages have not switched over to yet. -(setq byte-compile-warnings '(cl-functions)) - -;; Don't show the default modeline until doom-modeline loads -(setq-default mode-line-format nil) - -(provide 'early-init) -;;; early-init.el ends here diff --git a/.config/emacs/init.el b/.config/emacs/init.el deleted file mode 100644 index de19588..0000000 --- a/.config/emacs/init.el +++ /dev/null @@ -1,34 +0,0 @@ -;;; init.el --- Emacs main initialization file -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Commentary: - -;; Other than `early-init.el', this file is first looked at when Emacs is first -;; started. It only checks if the Emacs version is too low and the loads the -;; core/main.el file. - -;;; Code: - -(defvar earnemacs-minimum-emacs-version "27.1" - "Minimum Emacs version for earnemacs functionality.") - -;; Error if Emacs version is not supported -(if (version< emacs-version earnemacs-minimum-emacs-version) - (error (concat "[earnemacs] supports %s or higher, " - "but you are running %s." - earnemacs-minimum-emacs-version emacs-version))) - -;; Load! -(add-to-list 'load-path (expand-file-name "core/" user-emacs-directory)) -(require 'earnemacs-vars) -(require 'earnemacs-packages) - -(use-package earnemacs-main - :straight nil - :demand) - -(provide 'init) -;;; init.el ends here diff --git a/.config/emacs/load.el b/.config/emacs/load.el deleted file mode 100644 index 654fe7a..0000000 --- a/.config/emacs/load.el +++ /dev/null @@ -1,38 +0,0 @@ -(setq - earnemacs-modules '( - ;; completion - earnemod-company - earnemod-ivy - - ;; display - earnemod-focus - earnemod-scrolling - earnemod-window - - ;; editor - earnemod-everywhere - earnemod-check - earnemod-docker - earnemod-git - earnemod-lsp - earnemod-parens - - ;; projects - earnemod-treemacs - - ;; lang - earnemod-config - earnemod-markdown - earnemod-golang - earnemod-python - earnemod-rust - earnemod-web - - ;; apps - earnemod-elfeed - earnemod-gemini - earnemod-org - - ;; games - ) - ) diff --git a/.config/emacs/modules/app/earnemod-elfeed.el b/.config/emacs/modules/app/earnemod-elfeed.el deleted file mode 100644 index 27adf1c..0000000 --- a/.config/emacs/modules/app/earnemod-elfeed.el +++ /dev/null @@ -1,84 +0,0 @@ -;;; earnemod-elfeed.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package elfeed - :bind (:map elfeed-search-mode-map - ("q" . bjm/elfeed-save-db-and-bury) - ("w" . (lambda () (interactive) (elfeed-db-save))) - ("m" . elfeed-toggle-star) - ("b" . mz/elfeed-browse-url) - ("B" . elfeed-search-browse-url)) - :general - (earnemacs-spc-def "or" 'bjm/elfeed-load-db-and-open) - - :hook - (elfeed-show-mode . visual-line-mode) - (elfeed-show-mode . olivetti-mode) - - :config - ;; Set the default state to Emacs - (evil-set-initial-state 'elfeed-search-mode 'emacs) - (evil-set-initial-state 'elfeed-show-mode 'emacs) - - (defun elfeed-mark-all-as-read () - "Mark the whole buffer as read." - (interactive) - (mark-whole-buffer) - (elfeed-search-untag-all-unread)) - - (defun bjm/elfeed-load-db-and-open () - "Wrapper to load the elfeed db from disk before opening" - (interactive) - (elfeed-protocol-enable) - (elfeed-db-load) - (elfeed) - (elfeed-goodies/setup) - (elfeed-search-update--force)) - - (defun bjm/elfeed-save-db-and-bury () - "Wrapper to save the elfeed db to disk before burying buffer" - (interactive) - (elfeed-db-save) - (quit-window)) - - ;; Browse the URL at point without marking as read - ;; https://github.com/zamansky/dot-emacs/blob/master/README.org - (defun mz/elfeed-browse-url (&optional use-generic-p) - "Visit the current entry in your browser using `browse-url'. - If there is a prefix argument, visit the current entry in the - browser defined by `browse-url-generic-program'." - (interactive "P") - (let ((entries (elfeed-search-selected))) - (cl-loop for entry in entries - do (if use-generic-p - (browse-url-generic (elfeed-entry-link entry)) - (browse-url (elfeed-entry-link entry)))) - (mapc #'elfeed-search-update-entry entries) - (unless (or elfeed-search-remain-on-entry (use-region-p))))) - - ;; Take advantage of curl if it is available - (if (executable-find "curl") - (setq - elfeed-use-curl t - elfeed-curl-max-connections 10)) - - ;; Set the default search filter (space for convenience) - (setq-default elfeed-search-filter "@3-months-ago +unread ")) - -(use-package elfeed-protocol - :demand - :after elfeed) - -(use-package elfeed-goodies - :demand - :after elfeed - :config - ;; Make the feed source column width longer - (setq elfeed-goodies/feed-source-column-width 26)) - -(provide 'earnemod-elfeed) -;;; earnemod-elfeed.el ends here diff --git a/.config/emacs/modules/app/earnemod-gemini.el b/.config/emacs/modules/app/earnemod-gemini.el deleted file mode 100644 index 76140df..0000000 --- a/.config/emacs/modules/app/earnemod-gemini.el +++ /dev/null @@ -1,17 +0,0 @@ -;;; earnemod-gemini.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package elpher - :general - (earnemacs-spc-def "oG" 'elpher)) - -(use-package gemini-mode) - -(use-package ox-gemini) - -(provide 'earnemod-gemini) -;;; earnemod-gemini.el ends here diff --git a/.config/emacs/modules/app/earnemod-org.el b/.config/emacs/modules/app/earnemod-org.el deleted file mode 100644 index 8926d48..0000000 --- a/.config/emacs/modules/app/earnemod-org.el +++ /dev/null @@ -1,124 +0,0 @@ -;;; earnemod-org.el --- org-mode -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package org - ;; Use built-in org - :straight nil - - :general - (earnemacs-spc-def - "oA" 'org-agenda - "oC" 'org-capture) - :config - ;; Default directory containing org-mode files - (setq org-directory "~/org/") - - ;; Enable modules - (add-to-list 'org-modules 'org-habit) - - ;; Hooks: - ;; Indent correctly - (add-hook 'org-mode-hook 'org-indent-mode) - ;; Visual wrapping - (add-hook 'org-mode-hook 'visual-line-mode) - ;; Table of contents generation - (add-hook 'org-mode-hook 'toc-org-mode) - ;; Use sans-serif font - (add-hook 'org-mode-hook 'variable-pitch-mode) - - ;; Set indenting as default - (setq-default org-indent-mode t) - - ;; use org-mode + doom-themes improvements - (doom-themes-org-config) - - ;; Variable pitch and heading - (custom-theme-set-faces - ;; <3 https://zzamboni.org/post/beautifying-org-mode-in-emacs/ - 'user - '(org-block ((t (:inherit fixed-pitch)))) - '(org-code ((t (:inherit fixed-pitch)))) - '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch))))) - '(org-indent ((t (:inherit (org-hide fixed-pitch))))) - '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch))))) - '(org-property-value ((t (:inherit fixed-pitch))) t) - '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch))) - t)) - '(org-table ((t (:inherit fixed-pitch)))) - '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8)))) - '(org-verbatim ((t (:inherit (shadow fixed-pitch)))))) - - :custom - ;; Set number of lines between headings to display empty lines to 1 - (org-cycle-separator-lines 1) - - ;; Set default table formatting - (org-columns-set-default-format - "80ITM(Task) %10Effort(Effort){:} %10CLOCKSUM(Timed)") - - ;; Enforce todo dependencies - (org-enforce-todo-dependencies t) - - (org-global-properties (quote ( - ;; Set default Effort properties - ("Effort_ALL" . "0:05 0:10 0:15 0:20 - 0:30 0:45 1:00 1:30 2:00 4:00 6:00 8:00")))) - - ;; Drawer names - (org-log-into-drawer "LOGBOOK") - (org-clock-into-drawer "CLOCKING") - - ;; Do not set state triggers when using Shift to change states - (org-treat-S-cursor-todo-selection-as-state-change nil) - - ;; Log time when task marked as DONE - (org-log-done 'time) - - ;; Log note and time when rescheduling or redeadlining - (org-log-reschedule 'note) - (org-log-redeadline 'note) - - ;; Only show today's habits - (org-habit-show-habits-only-for-today t)) - -(use-package org-agenda - :after org - :straight nil - :bind (("C-c a" . org-agenda)) - :custom - (org-agenda-window-setup 'other-window) - (org-agenda-restore-windows-after-quit 't) - (org-agenda-dim-blocked-tasks t) - (org-agenda-span 4) - (org-agenda-start-on-weekday nil) - (org-agenda-start-day "-1d") - (org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled) - (org-agenda-skip-deadline-if-done nil) - (org-agenda-skip-scheduled-if-done nil)) - -(use-package org-capture - :after org - :straight nil - :bind (("C-c c" . org-capture)) - :custom - ;; Base capture templates - (org-capture-templates - `(("t" "Task" entry (file, "~/org/refile.org") - "* TODO %^{Task}\n:PROPERTIES:\n- Added: %U\n:END:" - :empty-lines 1 :immediate-finish t :clock-resume :kill-buffer)))) - -(use-package ox-ssh) - -(use-package toc-org) - -(use-package zpresent - :config - ;; Set default state to Emacs - (evil-set-initial-state 'zpresent-mode 'emacs)) - -(provide 'earnemod-org) -;;; earnemod-org.el ends here diff --git a/.config/emacs/modules/completion/earnemod-company.el b/.config/emacs/modules/completion/earnemod-company.el deleted file mode 100644 index 9921bcd..0000000 --- a/.config/emacs/modules/completion/earnemod-company.el +++ /dev/null @@ -1,59 +0,0 @@ -;;; earnecore-company.el --- Company completion -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package company - :init (global-company-mode) - :bind (:map company-active-map - ;; TAB should always complete the current selection - ("" . company-complete-selection) - - ;; Spaces should not try to complete - ("SPC" . nil)) - - :bind ((;; Trigger completion manually - "M-RET" . company-manual-begin)) - - :config - ;; Max number of results - (setq company-tooltip-limit 10) - - ;; Press M-# to complete that selection - (setq company-show-numbers t) - - ;; Show results immediately/ faster - (setq company-idle-delay 0) - (setq company-echo-delay 0) - (setq company-minimum-prefix-length 2) - - ;; Prevent non-matching input from blocking, but only if we explicitly - ;; interact with company - (setq company-require-match #'company-explicit-action-p) - - ;; Do not downcase completion suggestions - (setq company-dabbrev-downcase nil)) - -(use-package company-statistics - :demand - :after company - :config - ;; Load the company-statistics file silently. - (defun earnemacs--company-statistics--load () - "Restore statistics without a minibuffer message" - (load company-statistics-file 'noerror 'nomessage 'nosuffix)) - (advice-add 'company-statistics--load - :override #'earnemacs--company-statistics--load) - - ;; Load - (company-statistics-mode)) - -(use-package company-quickhelp - :demand - :after company - :config (company-quickhelp-mode)) - -(provide 'earnemod-company) -;;; earnemod-company.el ends here diff --git a/.config/emacs/modules/completion/earnemod-ivy.el b/.config/emacs/modules/completion/earnemod-ivy.el deleted file mode 100644 index bbd99b7..0000000 --- a/.config/emacs/modules/completion/earnemod-ivy.el +++ /dev/null @@ -1,22 +0,0 @@ -;;; earnecore-ivy.el --- Ivy -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package ivy - :demand - :general - (earnemacs-spc-def - "/" 'ivy-switch-buffer - "bb" 'ivy-switch-buffer) - :config - (ivy-mode 1)) - -(use-package counsel - :demand - :after ivy) - -(provide 'earnemod-ivy) -;;; earnemod-ivy.el ends here diff --git a/.config/emacs/modules/display/earnemod-focus.el b/.config/emacs/modules/display/earnemod-focus.el deleted file mode 100644 index c9bf134..0000000 --- a/.config/emacs/modules/display/earnemod-focus.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; earnemod-focus.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package olivetti - :general - (earnemacs-spc-def - "to" 'olivetti-mode)) - -(provide 'earnemod-focus) -;;; earnemod-focus.el ends here diff --git a/.config/emacs/modules/display/earnemod-scrolling.el b/.config/emacs/modules/display/earnemod-scrolling.el deleted file mode 100644 index 057b1b6..0000000 --- a/.config/emacs/modules/display/earnemod-scrolling.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; earnemod-scrolling.el --- Improves scrolling -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package good-scroll - :demand - :init - (good-scroll-mode +1)) - -(provide 'earnemod-scrolling) -;;; earnemod-scrolling.el ends here diff --git a/.config/emacs/modules/display/earnemod-window.el b/.config/emacs/modules/display/earnemod-window.el deleted file mode 100644 index 01aee33..0000000 --- a/.config/emacs/modules/display/earnemod-window.el +++ /dev/null @@ -1,29 +0,0 @@ -;;; earnemod-window.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package ace-window - :bind (("M-o" . 'ace-window) - ("M-O" . 'ace-delete-window)) - :general - (earnemacs-spc-def - "wo" 'ace-window - "wO" 'ace-delete-window - "wX" 'ace-delete-other-windows)) - -;; Easily undo/ redo window configuration -(use-package winner - :straight nil - :demand - :general - (earnemacs-spc-def - "wu" 'winner-undo - "wU" 'winner-redo) - :config - (winner-mode 1)) - -(provide 'earnemod-window) -;;; earnemod-window.el ends here diff --git a/.config/emacs/modules/editor/earnemod-check.el b/.config/emacs/modules/editor/earnemod-check.el deleted file mode 100644 index 7027152..0000000 --- a/.config/emacs/modules/editor/earnemod-check.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; earnemod-check.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package flycheck - :demand - :config - (global-flycheck-mode +1)) - -(provide 'earnemod-check) -;;; earnemod-check.el ends here diff --git a/.config/emacs/modules/editor/earnemod-docker.el b/.config/emacs/modules/editor/earnemod-docker.el deleted file mode 100644 index 270d186..0000000 --- a/.config/emacs/modules/editor/earnemod-docker.el +++ /dev/null @@ -1,18 +0,0 @@ -;;; earnemod-docker.el --- Docker -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: - -(use-package docker - :general - (earnemacs-spc-def "od" 'docker)) - -(use-package dockerfile-mode) - -(use-package docker-compose-mode) - -(provide 'earnemod-docker) -;;; earnemod-docker.el ends here diff --git a/.config/emacs/modules/editor/earnemod-everywhere.el b/.config/emacs/modules/editor/earnemod-everywhere.el deleted file mode 100644 index 47db690..0000000 --- a/.config/emacs/modules/editor/earnemod-everywhere.el +++ /dev/null @@ -1,13 +0,0 @@ -;;; earnemod-everywhere.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package emacs-everywhere - :if (or *sys-bsd* *sys-linux* *sys-mac*) - :demand) - -(provide 'earnemod-everywhere) -;;; earnemod-everywhere.el ends here diff --git a/.config/emacs/modules/editor/earnemod-git.el b/.config/emacs/modules/editor/earnemod-git.el deleted file mode 100644 index eb51361..0000000 --- a/.config/emacs/modules/editor/earnemod-git.el +++ /dev/null @@ -1,50 +0,0 @@ -;;; earnemod-git.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package ghq - :if (executable-find "ghq") - :general - (earnemacs-spc-def - "gc" 'ghq)) - -(use-package magit - :demand - :general - (earnemacs-spc-def - "g." 'magit-dispatch - "gb" 'magit-branch - "gf" 'magit-fetch - "gF" 'magit-pull - "gg" 'magit-status - "gs" 'magit-stage-file - "gS" 'magit-unstage-file - "gm" 'magit-merge - "gM" 'magit-remote - "gP" 'magit-push - "gr" 'magit-rebase - "gz" 'magit-stash) - :config - ;; Set default state to Emacs - (evil-set-initial-state 'magit-status-mode 'emacs)) - -(use-package git-gutter - :demand - :config - ;; Update every 2 seconds - (setq git-gutter:update-interval 2) - - ;; Load - (global-git-gutter-mode)) - -;; Follow symlinks -(setq vc-follow-symlinks t) - -;; Major mode for editing git files (ignore, attributes...) -(use-package git-modes) - -(provide 'earnemod-git) -;;; earnemod-git.el ends here diff --git a/.config/emacs/modules/editor/earnemod-lsp.el b/.config/emacs/modules/editor/earnemod-lsp.el deleted file mode 100644 index c7b0820..0000000 --- a/.config/emacs/modules/editor/earnemod-lsp.el +++ /dev/null @@ -1,29 +0,0 @@ -;;; earnemod-lsp.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package lsp-mode - :init - (setq lsp-keymap-prefix "C-c l") - :hook - ((lsp-mode . lsp-enable-which-key-integration))) - -(use-package lsp-ui - :demand - :after lsp-mode) - -(use-package lsp-ivy - :if (fboundp 'ivy-mode) - :demand - :after (lsp-mode ivy-mode)) - -(use-package lsp-treemacs - :if (fboundp 'treemacs) - :demand - :after (lsp-mode treemacs)) - -(provide 'earnemod-lsp) -;;; earnemod-lsp.el ends here diff --git a/.config/emacs/modules/editor/earnemod-parens.el b/.config/emacs/modules/editor/earnemod-parens.el deleted file mode 100644 index 46f1b11..0000000 --- a/.config/emacs/modules/editor/earnemod-parens.el +++ /dev/null @@ -1,19 +0,0 @@ -;;; earnemod-parens.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package smartparens - :demand - :config - ;; Enable globally - (smartparens-global-mode 1) - (show-smartparens-global-mode 1)) - -(use-package rainbow-delimiters - :hook (prog-mode . rainbow-delimiters-mode)) - -(provide 'earnemod-parens) -;;; earnemod-parens.el ends here diff --git a/.config/emacs/modules/lang/earnemod-config.el b/.config/emacs/modules/lang/earnemod-config.el deleted file mode 100644 index 0d900dc..0000000 --- a/.config/emacs/modules/lang/earnemod-config.el +++ /dev/null @@ -1,39 +0,0 @@ -;;; earnemod-config.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: - -;; TOML -(use-package toml-mode) - -;; JSON -(use-package json-mode) - -;; YAML -(use-package yaml-mode - :mode (("\\.yml\\'" . yaml-mode) - ("\\.yaml\\'" . yaml-mode)) - :config - (add-hook 'yaml-mode-hook - '(lambda () - (define-key yaml-mode-map "\C-m" 'newline-and-indent)))) - -;; SSH config files -(use-package ssh-config-mode) - -;; Nginx -(use-package nginx-mode - :config - (setq nginx-indent-tabs-mode t)) - -(use-package company-nginx - :config - (add-hook 'nginx-mode-hook - (lambda () - (add-to-list 'company-backends #'company-nginx)))) - -(provide 'earnemod-config) -;;; earnemod-config.el ends here diff --git a/.config/emacs/modules/lang/earnemod-golang.el b/.config/emacs/modules/lang/earnemod-golang.el deleted file mode 100644 index bfb5157..0000000 --- a/.config/emacs/modules/lang/earnemod-golang.el +++ /dev/null @@ -1,15 +0,0 @@ -;;; earnemod-golang.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package go-mode - :mode "\\.go\\'" - :config - ;; Start LSP - (add-hook 'go-mode-hook #'lsp-deferred)) - -(provide 'earnemod-golang) -;;; earnemod-golang.el ends here diff --git a/.config/emacs/modules/lang/earnemod-markdown.el b/.config/emacs/modules/lang/earnemod-markdown.el deleted file mode 100644 index acd3adb..0000000 --- a/.config/emacs/modules/lang/earnemod-markdown.el +++ /dev/null @@ -1,34 +0,0 @@ -;;; earnemod-markdown.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package markdown-mode - :mode (("README\\.md\\'" . gfm-mode) - ("\\.md\\'" . markdown-mode)) - :config - ;; Hooks: - ;; Visual line wrapping - (add-hook 'markdown-mode-hook 'visual-line-mode) - ;; Font - (add-hook 'markdown-mode-hook 'variable-pitch-mode) - ;; Center text - (add-hook 'markdown-mode-hook 'olivetti-mode) - ;; Line breaks - (add-hook 'markdown-mode-hook 'auto-fill-mode) - - ;; Font settings - (custom-theme-set-faces - 'user - '(markdown-code-face ((t (:inherit fixed-pitch)))) - '(markdown-header-face-1 ((t (:inherit variable-pitch :height 1.9)))) - '(markdown-header-face-2 ((t (:inherit variable-pitch :height 1.7)))) - '(markdown-header-face-3 ((t (:inherit variable-pitch :height 1.55)))) - '(markdown-header-face-4 ((t (:inherit variable-pitch :height 1.4)))) - '(markdown-header-face-5 ((t (:inherit variable-pitch :height 1.3)))) - '(markdown-header-face-6 ((t (:inherit variable-pitch :height 1.25)))))) - -(provide 'earnemod-markdown) -;;; earnecore-markdown.el ends here diff --git a/.config/emacs/modules/lang/earnemod-python.el b/.config/emacs/modules/lang/earnemod-python.el deleted file mode 100644 index 91322ee..0000000 --- a/.config/emacs/modules/lang/earnemod-python.el +++ /dev/null @@ -1,18 +0,0 @@ -;;; earnemod-python.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package elpy - :hook (python-mode . elpy-enable)) - -(use-package blacken - :hook (python-mode . blacken-mode) - :config - ;; Set line length - (setq blacken-line-length '79)) - -(provide 'earnemod-python) -;;; earnemod-python.el ends here diff --git a/.config/emacs/modules/lang/earnemod-rust.el b/.config/emacs/modules/lang/earnemod-rust.el deleted file mode 100644 index 2321718..0000000 --- a/.config/emacs/modules/lang/earnemod-rust.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; earnemod-rust.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Code: -(use-package rustic - :config - ;; Start LSP - (add-hook 'rustic-mode-hook #'lsp-deferred)) - -(provide 'earnemod-rust) -;;; earnecore-rust.el ends here diff --git a/.config/emacs/modules/lang/earnemod-web.el b/.config/emacs/modules/lang/earnemod-web.el deleted file mode 100644 index 51796b6..0000000 --- a/.config/emacs/modules/lang/earnemod-web.el +++ /dev/null @@ -1,16 +0,0 @@ -;;; earnemod-web.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;; code: -(use-package web-mode - :mode - "\\.html\\'" - "\\.css\\'") - -(use-package scss-mode) - -(provide 'earnemod-web) -;;; earnemod-web.el ends here diff --git a/.config/emacs/modules/projects/earnemod-treemacs.el b/.config/emacs/modules/projects/earnemod-treemacs.el deleted file mode 100644 index 3df6375..0000000 --- a/.config/emacs/modules/projects/earnemod-treemacs.el +++ /dev/null @@ -1,55 +0,0 @@ -;;; earnemod-treemacs.el --- Treemacs+Projectile -*- lexical-binding: t; -*- - -;; Copyright (C) 2020-2021 earnest ma -;; SPDX-License-Identifier: MIT -;; Author: earnest ma - -;;; Commentary: - -;; - -;;; Code: -(use-package treemacs - :init - ;; Set persist file per session name - (setq treemacs-persist-file (concat no-littering-var-directory - "treemacs/persist-" - earnemacs-daemon-name ".el")) - :general - (earnemacs-spc-def - "op" 'treemacs) - :config - ;; doom-themes + treemacs <3 (M-x all-the-icons-install-fonts) - (doom-themes-treemacs-config) - - ;; ? - (treemacs-fringe-indicator-mode 'only-when-focused) - - ;; Defer using git to check for modified files - (treemacs-git-mode 'deferred) - - ;; Auto-refresh when files change - (treemacs-filewatch-mode) - - ;; Follow the current file - (setq treemacs-follow-after-init t) - - ;; Set width of buffer - (setq treemacs-width 26) - - ;; Refresh without showing a message - (setq treemacs-silent-refresh t) - - ;; Do not show cursor in buffer - (setq treemacs-show-cursor nil)) - -(use-package treemacs-evil - :demand - :after treemacs) - -(use-package treemacs-projectile - :demand - :after treemacs) - -(provide 'earnemod-treemacs) -;;; earnemod-treemacs.el ends here diff --git a/.config/emacs/straight/versions/default.el b/.config/emacs/straight/versions/default.el deleted file mode 100644 index 5aa055c..0000000 --- a/.config/emacs/straight/versions/default.el +++ /dev/null @@ -1,101 +0,0 @@ -(("Highlight-Indentation-for-Emacs" . "d88db4248882da2d4316e76ed673b4ac1fa99ce3") - ("ace-jump-mode" . "8351e2df4fbbeb2a4003f2fb39f46d33803f3dac") - ("ace-window" . "c7cb315c14e36fded5ac4096e158497ae974bec9") - ("all-the-icons.el" . "facbde4a7be292bf9490932cbe403b443273f45d") - ("avy" . "e92cb37457b43336b765630dbfbea8ba4be601fa") - ("blacken" . "880cf502198753643a3e2ccd4131ee6973be2e8a") - ("cfrs" . "2cb7f1cbf9292b0efe167ef372cfb5a7600564eb") - ("company-mode" . "1fd1b363eee68e4cdcf0e610005c0bdbf9940604") - ("company-nginx" . "82bdb730ad5971c594d9c99c069f3c7bb067897d") - ("company-quickhelp" . "530b29380f0f95ae338cbe089693d786e6f53d86") - ("company-statistics" . "e62157d43b2c874d2edbd547c3bdfb05d0a7ae5c") - ("crux" . "20c07848049716a0e1aa2560e23b5f4149f2a74f") - ("dash.el" . "88d799595e8f1b4154637ce8a3f81b97b0520c1a") - ("docker-compose-mode" . "abaa4f3aeb5c62d7d16e186dd7d77f4e846e126a") - ("docker-tramp.el" . "aaee11cedf7b4c31700f24a1fd88dcef9c2a7c3d") - ("docker.el" . "9bcefbe54dbed4d364286fe65a87872e763ff7dc") - ("dockerfile-mode" . "ad06a41259ff2961d603bf23a3a8fbd22dde2161") - ("doom-modeline" . "07d03c4626eaaf2cc9c346308add3700ad4a3a06") - ("editorconfig-emacs" . "e10fa22b1304c5801b026c10cc5d65a97ccc0a48") - ("el-get" . "ec135b5353867ce3564a675e99024944b834395d") - ("elfeed" . "243add9e74003cd5718f33482b7bb8b4fe140fb5") - ("elfeed-goodies" . "95b4ea632fbd5960927952ec8f3394eb88da4752") - ("elfeed-protocol" . "5e17d4280f5f8019c3f8962a710c9b3e633f41ff") - ("elpher" . "3561c2815bc6bc896fc7a6da8f094edca48c55b8") - ("elpy" . "4248dccef31e260813d93cafd083bfcd71efc92a") - ("emacs-dashboard" . "9983aa0838ce5a2219ef4b674e6b37de41b5b585") - ("emacs-doom-themes" . "ac359fcc85b1bf8669f99263096affbcaab8e1a8") - ("emacs-everywhere" . "64ba2e3f3096f48928f7be06ed690069b96add22") - ("emacs-ghq" . "582bd6daa505d04c7cc06d6c82ed8aee0624bfbe") - ("emacs-noflet" . "7ae84dc3257637af7334101456dafe1759c6b68a") - ("emacs-request" . "f3a5b4352e9f444ace2a332939abff504b573887") - ("emacs-which-key" . "27d9fec33abb989b030f7677ccf5f799287d6472") - ("emacsmirror-mirror" . "dd06221ff3b997b8460eb6eefc92a8b07f844f95") - ("epl" . "78ab7a85c08222cd15582a298a364774e3282ce6") - ("evil" . "f20d442ff006aa5a6dc48ac654906b48b95107fd") - ("exec-path-from-shell" . "bf4bdc8b8911e7a2c04e624b9a343164c3878282") - ("f.el" . "50af874cd19042f17c8686813d52569b1025c76a") - ("flycheck" . "f8c679fff349850c80541a31de50009c3c15d4c9") - ("gemini.el" . "97e096ab2400bbe3c0f6d19fb49bd952f2f14e03") - ("general.el" . "a0b17d207badf462311b2eef7c065b884462cb7c") - ("git-gutter" . "35aa068bc2bd6ad8b0070d9f3948d30b76c2e939") - ("git-modes" . "433e1c57a63c88855fc41a942e29d7bc8c9c16c7") - ("gnu-elpa-mirror" . "bd355379a3143beb3514948685791096c3c5f750") - ("go-mode.el" . "34974346d1f74fa835d745514c9fe9afccce8dae") - ("good-scroll.el" . "26a1b958bbf2c45d86f033e58b74edd196302f23") - ("goto-chg" . "3ce1389fea12edde4e343bc7d54c8da97a1a6136") - ("ht.el" . "c4c1be487d6ecb353d07881526db05d7fc90ea87") - ("hydra" . "2d553787aca1aceb3e6927e426200e9bb9f056f1") - ("json-mode" . "0e819e519ae17a2686e0881c4ca51fa873fa9b83") - ("json-reformat" . "8eb6668ed447988aea06467ba8f42e1f2178246f") - ("json-snatcher" . "b28d1c0670636da6db508d03872d96ffddbc10f2") - ("let-alist" . "6708ec0b2e6dff80ff5b64698aa009d9070a2ed2") - ("lsp-ivy" . "bccd86028e669f5a1cad78364775fe7a0741ff93") - ("lsp-mode" . "690e25f32ccaa2935b346faf15b5d19538deadb0") - ("lsp-treemacs" . "905cc74726438cf06d8ad7cabb2efae75aeb2359") - ("lsp-ui" . "240a7de26400cf8b13312c3f9acf7ce653bdaa8a") - ("magit" . "b6751568c32b87f8b98c304531ad7f20799c6d86") - ("markdown-mode" . "1c7d29d52986b2cb153b5f643167ea49417de469") - ("melpa" . "9370b3c06f065ee50ed7e4ffcfd9d503b6e9563f") - ("modus-themes" . "9b1d1594efa5d7389300b93c78f1b1dd389f9c27") - ("nginx-mode" . "a2bab83c2eb233d57d76b236e7c141c2ccc97005") - ("no-littering" . "b12a85a5afff7b5d60f889c1c2e8f5deab7fdbae") - ("olivetti" . "4a0719021625ece4def8f18d28f86a681bee7d28") - ("org-parser" . "47e3ae9146978681843f25552cfa99875404db2e") - ("ox-gemini" . "d88c10bcb10fc463fa5a2f6e29c8c94b75a314c0") - ("ox-ssh" . "1b39849e3a315de95543eb3cf69c42fa33a8f5cd") - ("page-break-lines" . "3b8549cd414d4d7ee0168ab9917124133566d3db") - ("pfuture" . "d7926de3ba0105a36cfd00811fd6278aea903eef") - ("pkg-info" . "76ba7415480687d05a4353b27fea2ae02b8d9d61") - ("popwin" . "1184368d3610bd0d0ca4a3db4068048c562c2b50") - ("pos-tip" . "179cc126b363f72ca12fab1e0dc462ce0ee79742") - ("posframe" . "f97c4aff2c2c376ca62276d5597aa108546633a9") - ("powerline" . "cfba2aa9cfa190e7720900f01a946e1e78aac7e2") - ("project" . "4072f35d85bf0a1c669329d66633e4819f497c1c") - ("projectile" . "da08a9103b5ba3b38ef031a9627a19436eb318b5") - ("pyvenv" . "045ff9476dac26086a04538d9b7ba186aa8f0fd1") - ("rainbow-delimiters" . "d576e6694ad3a3e88b2bb1363305b38fa364c149") - ("rustic" . "bbf129cd128105de51b6c242b2551094b8d8987d") - ("s.el" . "08661efb075d1c6b4fa812184c1e5e90c08795a9") - ("scss-mode" . "cf58dbec5394280503eb5502938f3b5445d1b53d") - ("shrink-path.el" . "c14882c8599aec79a6e8ef2d06454254bb3e1e41") - ("smartparens" . "911cc896a0f2eb8b5fbdd6fc8331523ad9889a3a") - ("spinner" . "34905eae12a236753fa88abc831eff1e41e8576e") - ("ssh-config-mode-el" . "41deddfd39e6461526037570e800ada9a0ae7fa7") - ("straight.el" . "b45dd00408ff8e922f2d7f75441fd5603e5222fa") - ("super-save" . "886b5518c8a8b4e1f5e59c332d5d80d95b61201d") - ("swiper" . "040d458bce4a88f37359192061bcea5ebe87007c") - ("tablist" . "faab7a035ef2258cc4ea2182f67e3aedab7e2af9") - ("toc-org" . "df4ad6ff15e3b02f6322305638a441a636b9b37e") - ("toml-mode.el" . "f6c61817b00f9c4a3cab1bae9c309e0fc45cdd06") - ("transient" . "51e833e5152e9fdcdc1dbbf34ad2d4905bde1f69") - ("treemacs" . "2655a8976d56719add893cec45a18e018626842d") - ("use-package" . "a7422fb8ab1baee19adb2717b5b47b9c3812a84c") - ("web-mode" . "8ef47935d638902ba35a557cae5edd6ab6ab1346") - ("with-editor" . "5519b6a67ecd66865b4fdd5447425eee900c54f4") - ("xref" . "17d6e63718d1b9837b0a490a50fe75fe21f8e322") - ("xterm-color" . "1a4012854c69a5cdaeb5a73d2ad705011892fca3") - ("yaml-mode" . "3a57058468211f3cb18e71aecc630dcacb87636b") - ("yasnippet" . "5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6") - ("zpresent" . "1cd062970eba40b83d26466fd1552ab2c714c8a8")) -:beta diff --git a/.config/emacs/straight/versions/pinned.el b/.config/emacs/straight/versions/pinned.el deleted file mode 100644 index 8f01dc8..0000000 --- a/.config/emacs/straight/versions/pinned.el +++ /dev/null @@ -1,2 +0,0 @@ -() -:beta