From bc353c614d7235edc0c1325edfef0b385fc1d31d Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 3 Nov 2025 15:43:36 -0600 Subject: refactor: Replace doom-modeline with mood-line and remove deprecated tree-sitter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Method 2 improvements for cleaner, faster configuration: 1. **Replaced doom-modeline with mood-line** (modules/modeline-config.el) - Simplified from 70+ lines to ~10 lines (-40 lines net) - mood-line is lightweight, minimal, inspired by doom-modeline - Better performance with no dependencies - Keeps all essential features: buffer status, major mode, VCS, flycheck, cursor position, multiple-cursors counters 2. **Removed deprecated tree-sitter package** (modules/prog-general.el) - Deleted `(use-package tree-sitter)` - Now relies solely on Emacs 29+ built-in treesit with treesit-auto - treesit-auto continues to manage grammars automatically - No functionality lost, cleaner dependency tree Both changes serve Method 2: "Stop Problems Before They Appear" - Simpler code = fewer bugs - Fewer dependencies = less maintenance - Native features = better integration Updated todo.org to mark both tasks complete [2/5 in Method 2]. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/modeline-config.el | 74 ++++++++++------------------------------------ modules/prog-general.el | 3 +- todo.org | 43 +++++++++++++-------------- 3 files changed, 37 insertions(+), 83 deletions(-) diff --git a/modules/modeline-config.el b/modules/modeline-config.el index 0a247732..af0c3524 100644 --- a/modules/modeline-config.el +++ b/modules/modeline-config.el @@ -3,72 +3,28 @@ ;;; Commentary: -;; Doom modeline configuration with performance optimizations. +;; Minimal modeline configuration using mood-line. -;; Settings prioritize speed while keeping essential information including: -;; - relative file paths from project root -;; - column number and percentage position -;; - buffer modification indicators -;; - and major mode with icon. +;; mood-line is a lightweight, minimal modeline inspired by doom-modeline +;; but with much better performance and simpler configuration. -;; Disabled features for performance: -;; - minor modes display -;; - word count -;; - encoding info -;; - LSP information - -;; Performance tuning includes: -;; - 0.75 second refresh rate -;; - 1MB process output chunks -;; - nerd-icons (faster than all-the-icons) -;; - simplified checker format -;; - limited VCS info length +;; Features: +;; - Buffer status and modification indicators +;; - Major mode display +;; - Version control status +;; - Flycheck/Flymake status +;; - Cursor position and buffer percentage +;; - Anzu and multiple-cursors counters +;; - No dependencies +;; - Minimal performance overhead ;;; Code: -;; ------------------------------- Doom Modeline ------------------------------- - -(use-package doom-modeline - :hook (after-init . doom-modeline-mode) - :custom - ;; Performance optimizations - (doom-modeline-buffer-file-name-style 'relative-from-project) ;; Faster than 'file-name - (doom-modeline-icon t) - (doom-modeline-major-mode-icon t) - (doom-modeline-major-mode-color-icon t) - (doom-modeline-buffer-state-icon t) - (doom-modeline-buffer-modification-icon t) - (doom-modeline-unicode-fallback nil) - (doom-modeline-minor-modes nil) ;; Hide minor modes as requested - (doom-modeline-enable-word-count nil) ;; Faster without word count - (doom-modeline-continuous-word-count-modes nil) - (doom-modeline-buffer-encoding nil) ;; Hide encoding for speed - (doom-modeline-indent-info nil) ;; Hide indent info for speed - (doom-modeline-checker-simple-format t) ;; Simpler checker format for speed - (doom-modeline-number-limit 99) ;; Lower number limit for better performance - (doom-modeline-vcs-max-length 12) ;; Limit VCS info length for speed - (doom-modeline-persp-name nil) ;; Disable perspective name for speed - (doom-modeline-display-default-persp-name nil) - (doom-modeline-persp-icon nil) - (doom-modeline-lsp nil) ;; Disable LSP info for speed - - ;; UI Preferences - (doom-modeline-height 25) - (doom-modeline-bar-width 3) - (doom-modeline-window-width-limit 0.25) - (doom-modeline-project-detection 'projectile) ;; Use projectile if available, nil is faster - - ;; Use nerd-icons instead of all-the-icons - (doom-modeline-icon-preference 'nerd-icons) +;; -------------------------------- mood-line ---------------------------------- - ;; Enable elements you specifically requested - (doom-modeline-column-number t) ;; Show column number - (doom-modeline-percent-position t) ;; Show percentage position - (doom-modeline-buffer-name t) ;; Show buffer name - (doom-modeline-buffer-file-name t) ;; Show file name +(use-package mood-line :config - (setq read-process-output-max (* 1024 1024)) ;; 1MB process read size for better performance - (setq doom-modeline-refresh-rate 0.75)) ;; Update rate in seconds + (mood-line-mode)) (provide 'modeline-config) diff --git a/modules/prog-general.el b/modules/prog-general.el index 3ece928a..0ae6aa82 100644 --- a/modules/prog-general.el +++ b/modules/prog-general.el @@ -93,8 +93,7 @@ ;; --------------------------------- Treesitter -------------------------------- ;; incremental language syntax parser - -(use-package tree-sitter) +;; Using Emacs 29+ built-in treesit with treesit-auto for grammar management ;; installs tree-sitter grammars if they're absent (use-package treesit-auto diff --git a/todo.org b/todo.org index 48a18833..e9e316de 100644 --- a/todo.org +++ b/todo.org @@ -17,7 +17,7 @@ If the answer is "no" to all five → DON'T ADD IT. V2MOM is located at: [[file:docs/emacs-config-v2mom.org][emacs-config-v2mom.org]] Research/ideas that don't serve vision: [[file:docs/someday-maybe.org][someday-maybe.org]] -* Method 1: Make Using Emacs Frictionless +* Method 1: Make Using Emacs Frictionless [5/13] ** DONE [#A] Remove network check from startup (saves 1+ seconds) CLOSED: [2025-10-31 Fri] @@ -196,7 +196,7 @@ EMMS keybindings conflict with standard buffer keybindings, causing mistypes. Results in accidental destructive actions (clearing buffers), requires undo + context switch. Violates Intuitive value - muscle memory should help, not hurt. -* Method 2: Stop Problems Before They Appear +* Method 2: Stop Problems Before They Appear [2/5] ** TODO [#B] Migrate from Company to Corfu :PROPERTIES: @@ -205,13 +205,24 @@ Violates Intuitive value - muscle memory should help, not hurt. Complete config already exists in someday-maybe.org. Just needs to be executed. -** TODO [#C] Switch to mood-line +** DONE [#C] Switch to mood-line +CLOSED: [2025-11-03 Sun] -Already researched. Lighter modeline. +✅ Replaced doom-modeline with mood-line in modules/modeline-config.el +- Simplified from 70+ lines to ~10 lines of configuration +- mood-line is lightweight, minimal, inspired by doom-modeline +- Better performance with no dependencies +- Features: buffer status, major mode, VCS, flycheck, cursor position +- Net reduction: -40 lines of configuration code -** TODO [#C] Remove deprecated tree-sitter package (rely on treesit-auto) +** DONE [#C] Remove deprecated tree-sitter package (rely on treesit-auto) +CLOSED: [2025-11-03 Sun] -Already have treesit-auto installed. Just remove old package. +✅ Removed deprecated tree-sitter package from modules/prog-general.el +- Deleted `(use-package tree-sitter)` on line 97 +- Now relies solely on Emacs 29+ built-in treesit with treesit-auto +- treesit-auto continues to manage tree-sitter grammars automatically +- No functionality lost, cleaner dependency tree ** TODO [#C] Add org-appear (show emphasis markers only when point is on them) @@ -221,7 +232,7 @@ Cleaner org files, supports Intuitive value. Already using prescient with vertico. Extend to Corfu after migration. -* Method 3: Make *Fixing* Emacs Frictionless +* Method 3: Make *Fixing* Emacs Frictionless [0/5] ** TODO [#B] Build debug-profiling.el module @@ -245,7 +256,7 @@ Repeatable installs and safe rollbacks. Structural diffs that show semantic changes. Hook into cj/diff-buffer-with-file. -* Method 4: Contribute to the Emacs Ecosystem +* Method 4: Contribute to the Emacs Ecosystem [0/4] ** TODO [#C] Set up package-lint for elisp linting (chime, org-msg, wttrin) @@ -263,7 +274,7 @@ Zero-config CI for Emacs packages. Measure and track test coverage over time. -* Method 5: Be Kind To Your Future Self +* Method 5: Be Kind To Your Future Self [0/2] ** TODO [#C] Add transcription workflow :PROPERTIES: @@ -276,7 +287,7 @@ Complete code already exists in someday-maybe.org. Need today and recurring. Create reveal.js slides from org-mode. -* Method 6: Develop Disciplined Engineering Practices +* Method 6: Develop Disciplined Engineering Practices [0/3] ** TODO [#A] First weekly triage by Sunday (establish habit) SCHEDULED: <2025-11-03 Sun> @@ -293,15 +304,3 @@ Review this inbox, cancel stale items, keep < 20 active. Track in calendar. Can't research next thing until current thing is implemented. * Emacs Config Inbox -** DONE [#A] Irritant: Print should be keybound to capital P -CLOSED: [2025-11-03 Sun] - -Swapped keybindings: -- C-; b p → copy file path (safe, common action) -- C-; b P → print to PS (dramatic, requires shift) - -** DONE [#A] Irritant: send buffer to printer must have confirmation -CLOSED: [2025-11-03 Sun] - -Added y-or-n-p confirmation to cj/print-buffer-ps. -C-u prefix skips confirmation and prints in color. -- cgit v1.2.3