summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbh <qn+git@excalibur.computer>2025-12-14 00:06:11 +0800
committerbh <qn+git@excalibur.computer>2025-12-14 00:06:11 +0800
commit096790cd907f4874e0e121c42b6b33a50e5105d2 (patch)
tree622321021031f5b59084ab25fbe82da129c78a9e
parent490e3970b6df1ce400cb21b521da9a861b739023 (diff)
Cleaned the indentation up
-rw-r--r--config/completion.el156
-rw-r--r--config/evil.el18
-rw-r--r--config/magit.el44
3 files changed, 109 insertions, 109 deletions
diff --git a/config/completion.el b/config/completion.el
index f723966..1811baf 100644
--- a/config/completion.el
+++ b/config/completion.el
@@ -5,21 +5,21 @@
;; Vertico - Vertical completion UI
;; =====================================
(use-package vertico
- :init
- (vertico-mode 1)
- :config
- ;; Cycle through candidates
- (setq vertico-cycle t)
- ;; Number of candidates to display
- (setq vertico-count 15))
+ :init
+ (vertico-mode 1)
+ :config
+ ;; Cycle through candidates
+ (setq vertico-cycle t)
+ ;; Number of candidates to display
+ (setq vertico-count 15))
;; =====================================
;; Orderless - Flexible completion style
;; =====================================
(use-package orderless
- :config
- ;; Use orderless for completion
- (setq completion-styles '(orderless basic)
+ :config
+ ;; Use orderless for completion
+ (setq completion-styles '(orderless basic)
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
@@ -27,90 +27,90 @@
;; Marginalia - Rich annotations
;; =====================================
(use-package marginalia
- :init
- (marginalia-mode 1)
- :config
- ;; Bind in minibuffer to toggle annotations
- (define-key minibuffer-local-map (kbd "M-A") 'marginalia-cycle))
+ :init
+ (marginalia-mode 1)
+ :config
+ ;; Bind in minibuffer to toggle annotations
+ (define-key minibuffer-local-map (kbd "M-A") 'marginalia-cycle))
;; =====================================
;; Consult - Enhanced commands
;; =====================================
(use-package consult
- :bind
- (;; C-c bindings (mode-specific-map)
- ("C-c h" . consult-history)
- ("C-c m" . consult-mode-command)
- ("C-c k" . consult-kmacro)
+ :bind
+ (;; C-c bindings (mode-specific-map)
+ ("C-c h" . consult-history)
+ ("C-c m" . consult-mode-command)
+ ("C-c k" . consult-kmacro)
+
+ ;; C-x bindings (ctl-x-map)
+ ("C-x M-:" . consult-complex-command)
+ ("C-x b" . consult-buffer) ;; Replace switch-to-buffer
+ ("C-x 4 b" . consult-buffer-other-window)
+ ("C-x 5 b" . consult-buffer-other-frame)
+ ("C-x r b" . consult-bookmark)
+
+ ;; M-g bindings (goto-map)
+ ("M-g e" . consult-compile-error)
+ ("M-g f" . consult-flymake)
+ ("M-g g" . consult-goto-line)
+ ("M-g M-g" . consult-goto-line)
+ ("M-g o" . consult-outline)
+ ("M-g m" . consult-mark)
+ ("M-g k" . consult-global-mark)
+ ("M-g i" . consult-imenu)
+ ("M-g I" . consult-imenu-multi)
+
+ ;; M-s bindings (search-map)
+ ("M-s d" . consult-find)
+ ("M-s D" . consult-locate)
+ ("M-s g" . consult-grep)
+ ("M-s G" . consult-git-grep)
+ ("M-s r" . consult-ripgrep)
+ ("M-s l" . consult-line)
+ ("M-s L" . consult-line-multi)
+ ("M-s k" . consult-keep-lines)
+ ("M-s u" . consult-focus-lines)
+
+ ;; Isearch integration
+ ("M-s e" . consult-isearch-history)
+ :map isearch-mode-map
+ ("M-e" . consult-isearch-history)
+ ("M-s e" . consult-isearch-history)
+ ("M-s l" . consult-line)
+ ("M-s L" . consult-line-multi)
+
+ ;; Minibuffer history
+ :map minibuffer-local-map
+ ("M-s" . consult-history)
+ ("M-r" . consult-history))
- ;; C-x bindings (ctl-x-map)
- ("C-x M-:" . consult-complex-command)
- ("C-x b" . consult-buffer) ;; Replace switch-to-buffer
- ("C-x 4 b" . consult-buffer-other-window)
- ("C-x 5 b" . consult-buffer-other-frame)
- ("C-x r b" . consult-bookmark)
-
- ;; M-g bindings (goto-map)
- ("M-g e" . consult-compile-error)
- ("M-g f" . consult-flymake)
- ("M-g g" . consult-goto-line)
- ("M-g M-g" . consult-goto-line)
- ("M-g o" . consult-outline)
- ("M-g m" . consult-mark)
- ("M-g k" . consult-global-mark)
- ("M-g i" . consult-imenu)
- ("M-g I" . consult-imenu-multi)
-
- ;; M-s bindings (search-map)
- ("M-s d" . consult-find)
- ("M-s D" . consult-locate)
- ("M-s g" . consult-grep)
- ("M-s G" . consult-git-grep)
- ("M-s r" . consult-ripgrep)
- ("M-s l" . consult-line)
- ("M-s L" . consult-line-multi)
- ("M-s k" . consult-keep-lines)
- ("M-s u" . consult-focus-lines)
-
- ;; Isearch integration
- ("M-s e" . consult-isearch-history)
- :map isearch-mode-map
- ("M-e" . consult-isearch-history)
- ("M-s e" . consult-isearch-history)
- ("M-s l" . consult-line)
- ("M-s L" . consult-line-multi)
-
- ;; Minibuffer history
- :map minibuffer-local-map
- ("M-s" . consult-history)
- ("M-r" . consult-history))
-
- :config
- ;; Preview configuration
- (setq consult-preview-key 'any) ;; Preview as you type
-
- ;; Narrowing configuration
- (setq consult-narrow-key "<")) ;; Use < to narrow
+ :config
+ ;; Preview configuration
+ (setq consult-preview-key 'any) ;; Preview as you type
+
+ ;; Narrowing configuration
+ (setq consult-narrow-key "<")) ;; Use < to narrow
;; =====================================
;; Embark - Actions on candidates
;; =====================================
(use-package embark
- :bind
- (("C-." . embark-act) ;; Pick an action using completion
- ("C-;" . embark-dwim) ;; Good alternative: M-.
- ("C-h B" . embark-bindings)) ;; Alternative for `describe-bindings'
- :config
- ;; Hide the mode line of the Embark live/completions buffers
- (add-to-list 'display-buffer-alist
+ :bind
+ (("C-." . embark-act) ;; Pick an action using completion
+ ("C-;" . embark-dwim) ;; Good alternative: M-.
+ ("C-h B" . embark-bindings)) ;; Alternative for `describe-bindings'
+ :config
+ ;; Hide the mode line of the Embark live/completions buffers
+ (add-to-list 'display-buffer-alist
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
nil
(window-parameters (mode-line-format . none)))))
;; Embark + Consult integration
(use-package embark-consult
- :after (embark consult)
- :hook
- (embark-collect-mode . consult-preview-at-point-mode))
+ :after (embark consult)
+ :hook
+ (embark-collect-mode . consult-preview-at-point-mode))
(provide 'completion)
diff --git a/config/evil.el b/config/evil.el
index 4bf6871..8d745f1 100644
--- a/config/evil.el
+++ b/config/evil.el
@@ -4,18 +4,18 @@
(setq evil-want-keybinding nil)
(use-package evil
- :init
- (setq evil-want-integration t) ;; Required for evil-collection
- (setq evil-undo-system 'undo-redo) ;; Use Emacs 28+ built-in undo-redo
- :config
- (evil-mode 1))
+ :init
+ (setq evil-want-integration t) ;; Required for evil-collection
+ (setq evil-undo-system 'undo-redo) ;; Use Emacs 28+ built-in undo-redo
+ :config
+ (evil-mode 1))
;; Restore Emacs-style C-n/C-p in insert mode for line movement
;; (define-key evil-insert-state-map (kbd "C-n") 'next-line)
;; (define-key evil-insert-state-map (kbd "C-p") 'previous-line))
(use-package evil-collection
- :after evil
- :straight (evil-collection :type git :host github :repo "emacs-evil/evil-collection"
+ :after evil
+ :straight (evil-collection :type git :host github :repo "emacs-evil/evil-collection"
:files (:defaults "modes"))
- :config
- (evil-collection-init)) ;; Provides Evil bindings for many Emacs modes
+ :config
+ (evil-collection-init)) ;; Provides Evil bindings for many Emacs modes
diff --git a/config/magit.el b/config/magit.el
index 29d7b64..85f2de0 100644
--- a/config/magit.el
+++ b/config/magit.el
@@ -1,41 +1,41 @@
;; Magit - Simple Git interface for Emacs
(use-package magit
- :bind
- (("C-x g" . magit-status) ;; Open Magit status
- ("C-x M-g" . magit-dispatch) ;; Magit command menu
- ("C-c M-g" . magit-file-dispatch) ;; File-specific commands
- ("C-c g b" . magit-blame) ;; Git blame for current file
- ("C-c g l" . magit-log-buffer-file) ;; Log for current file
- ("C-c g d" . magit-diff-buffer-file));; Diff for current file
- :config
- ;; Section highlight (when cursor is on a section)
- (set-face-attribute 'magit-section-highlight nil
+ :bind
+ (("C-x g" . magit-status) ;; Open Magit status
+ ("C-x M-g" . magit-dispatch) ;; Magit command menu
+ ("C-c M-g" . magit-file-dispatch) ;; File-specific commands
+ ("C-c g b" . magit-blame) ;; Git blame for current file
+ ("C-c g l" . magit-log-buffer-file) ;; Log for current file
+ ("C-c g d" . magit-diff-buffer-file));; Diff for current file
+ :config
+ ;; Section highlight (when cursor is on a section)
+ (set-face-attribute 'magit-section-highlight nil
:background "#004344")
- ;; Section heading text color (like "Unstaged changes", "Staged changes", etc.)
- (set-face-attribute 'magit-section-heading nil
+ ;; Section heading text color (like "Unstaged changes", "Staged changes", etc.)
+ (set-face-attribute 'magit-section-heading nil
:foreground "#ffc600")
- ;; Diff hunk headers (the @@ lines)
- (set-face-attribute 'magit-diff-hunk-heading nil
+ ;; Diff hunk headers (the @@ lines)
+ (set-face-attribute 'magit-diff-hunk-heading nil
:background "#002323"
:foreground "#8affff")
- (set-face-attribute 'magit-diff-hunk-heading-highlight nil
+ (set-face-attribute 'magit-diff-hunk-heading-highlight nil
:background "#112b2b"
:foreground "#8affff")
- ;; Diff context lines (unchanged lines in diffs)
- (set-face-attribute 'magit-diff-context nil
+;; Diff context lines (unchanged lines in diffs)
+(set-face-attribute 'magit-diff-context nil
:background "#003636")
- (set-face-attribute 'magit-diff-context-highlight nil
+(set-face-attribute 'magit-diff-context-highlight nil
:background "#004344")
- ;; Show recent commits
- (setq magit-log-section-commit-count 10)
+;; Show recent commits
+(setq magit-log-section-commit-count 10)
- ;; Customize section order - keep unstaged, staged, and recent commits at top
- (setq magit-status-sections-hook
+;; Customize section order - keep unstaged, staged, and recent commits at top
+(setq magit-status-sections-hook
'(magit-insert-status-headers
magit-insert-staged-changes
magit-insert-unstaged-changes