Refactor org-recur and copilot configurations

- Replaced `use-package` with `require` and `after!` for org-recur.
- Simplified keybindings for org-recur.
- Updated copilot configuration to use `after!` and `map!`.
- Ensured copilot is loaded.
- Standardized configuration style.
This commit is contained in:
Roger Gonzalez 2025-03-30 12:04:01 -03:00
parent 9ea2a251a0
commit 13d5351478
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6

View File

@ -236,16 +236,19 @@ TODO: Breakup this section into smaller, more focused components later
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
;; Org recur ;; Org recur
(use-package org-recur ;; Load org-recur
:hook ((org-mode . org-recur-mode) (require 'org-recur)
(org-agenda-mode . org-recur-agenda-mode))
:demand t
:config
(define-key org-recur-mode-map (kbd "C-c d") 'org-recur-finish)
;; Rebind the 'd' key in org-agenda (default: `org-agenda-day-view'). (after! org-recur
(define-key org-recur-agenda-mode-map (kbd "C-c d") 'org-recur-finish) (add-hook 'org-mode-hook #'org-recur-mode)
(define-key org-recur-agenda-mode-map (kbd "C-c 0") 'org-recur-schedule-today) (add-hook 'org-agenda-mode-hook #'org-recur-agenda-mode)
(map! :map org-recur-mode-map
"C-c d" #'org-recur-finish)
(map! :map org-recur-agenda-mode-map
"C-c d" #'org-recur-finish
"C-c 0" #'org-recur-schedule-today)
(setq org-recur-finish-done t (setq org-recur-finish-done t
org-recur-finish-archive t)) org-recur-finish-archive t))
@ -585,11 +588,12 @@ Clipmon serves as my clipboard manager within Emacs. I chose it over alternative
The configuration below sets up Clipmon to check the clipboard every second and makes the kill ring accessible through M-y with helm integration. The configuration below sets up Clipmon to check the clipboard every second and makes the kill ring accessible through M-y with helm integration.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package clipmon ;; Ensure clipmon is loaded
:init (require 'clipmon)
(after! clipmon
(global-set-key (kbd "M-y") 'helm-show-kill-ring) (global-set-key (kbd "M-y") 'helm-show-kill-ring)
(add-to-list 'after-init-hook 'clipmon-mode-start) (add-to-list 'after-init-hook 'clipmon-mode-start)
:config
(defadvice clipmon--on-clipboard-change (around stop-clipboard-parsing activate) (defadvice clipmon--on-clipboard-change (around stop-clipboard-parsing activate)
(let ((interprogram-cut-function nil)) ad-do-it)) (let ((interprogram-cut-function nil)) ad-do-it))
(setq clipmon-timer-interval 1)) (setq clipmon-timer-interval 1))
@ -715,13 +719,16 @@ Now, write the commit message in this exact format:
:END: :END:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package! copilot ;; Load copilot
:hook (prog-mode . copilot-mode) (require 'copilot)
:bind (:map copilot-completion-map
("<tab>" . 'copilot-accept-completion) (after! copilot
("TAB" . 'copilot-accept-completion) (add-hook 'prog-mode-hook #'copilot-mode)
("C-TAB" . 'copilot-accept-completion-by-word) (map! :map copilot-completion-map
("C-<tab>" . 'copilot-accept-completion-by-word))) "<tab>" #'copilot-accept-completion
"TAB" #'copilot-accept-completion
"C-TAB" #'copilot-accept-completion-by-word
"C-<tab>" #'copilot-accept-completion-by-word))
#+end_src #+end_src
*** Aider *** Aider
:PROPERTIES: :PROPERTIES: