Add ‘ace-link’-specific settings
This commit is contained in:
parent
f1e8928c6d
commit
25d760efc8
2 changed files with 37 additions and 4 deletions
|
@ -78,7 +78,8 @@
|
|||
home-emacs-dashboard-service-type
|
||||
home-emacs-dashboard-configuration
|
||||
home-emacs-eros-service-type
|
||||
home-emacs-ace-link-service-type))
|
||||
home-emacs-ace-link-service-type
|
||||
home-emacs-ace-link-configuration))
|
||||
#:use-module ((oni home services environment)
|
||||
#:select (home-environment-service))
|
||||
#:use-module ((oni home services flameshot)
|
||||
|
@ -421,7 +422,11 @@
|
|||
(service home-emacs-yasnippet-capf-service-type)
|
||||
(service home-emacs-dashboard-service-type)
|
||||
(service home-emacs-eros-service-type)
|
||||
(service home-emacs-ace-link-service-type)
|
||||
(service home-emacs-ace-link-service-type
|
||||
(home-emacs-ace-link-configuration
|
||||
(default-key "C-S-e")
|
||||
(goto-address-key "C-S-e")
|
||||
(org-mode-key "C-S-e")))
|
||||
|
||||
(service home-flameshot-service-type)
|
||||
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
define-configuration
|
||||
define-configuration/no-serialization
|
||||
text-config?
|
||||
serialize-text-config))
|
||||
serialize-text-config
|
||||
define-maybe
|
||||
maybe-value-set?))
|
||||
#:use-module ((gnu packages emacs)
|
||||
#:select (emacs))
|
||||
#:use-module ((gnu packages emacs-xyz)
|
||||
|
@ -48,6 +50,8 @@
|
|||
home-emacs-ace-link-service-type
|
||||
home-emacs-ace-link-configuration))
|
||||
|
||||
(define-maybe string)
|
||||
|
||||
(define-configuration/no-serialization home-emacs-extension
|
||||
(configurations
|
||||
(text-config '())
|
||||
|
@ -242,6 +246,15 @@
|
|||
(package
|
||||
(package emacs-ace-link)
|
||||
"Package to use for setting emacs-ace-link.")
|
||||
(default-key
|
||||
(string "o")
|
||||
"Key to use as the default keybinding.")
|
||||
(goto-address-key
|
||||
maybe-string
|
||||
"Key to use (if any) to bind with goto-address-mode.")
|
||||
(org-mode-key
|
||||
maybe-string
|
||||
"Key to use (if any) to bind with org-mode.")
|
||||
(configurations
|
||||
(text-config '())
|
||||
"Configuration for emacs-ace-link."))
|
||||
|
@ -251,7 +264,22 @@
|
|||
(configurations
|
||||
(append
|
||||
(list (mixed-text-file "ace-link-config"
|
||||
"(ace-link-setup-default)\n"))
|
||||
";;;;; ace-link-config starts here.\n"
|
||||
(format #f "(ace-link-setup-default (kbd ~s))~%"
|
||||
(home-emacs-ace-link-configuration-default-key config))
|
||||
(let ((goto-address-key
|
||||
(home-emacs-ace-link-configuration-goto-address-key config)))
|
||||
(if (maybe-value-set? goto-address-key)
|
||||
(string-append (format #f "(defun ace-link-config-set-goto-address-key () (local-set-key (kbd ~s) 'ace-link-addr))~%" goto-address-key)
|
||||
"(add-hook 'goto-address-prog-mode-hook #'ace-link-config-set-goto-address-key)\n"
|
||||
"(add-hook 'goto-address-mode-hook #'ace-link-config-set-goto-address-key)\n")
|
||||
""))
|
||||
(let ((org-mode-key
|
||||
(home-emacs-ace-link-configuration-org-mode-key config)))
|
||||
(if (maybe-value-set? org-mode-key)
|
||||
(format #f "(with-eval-after-load 'org (define-key org-mode-map (kbd ~s) 'ace-link-org))\n" org-mode-key)
|
||||
""))
|
||||
";;;;; ace-link-config ends here.\n"))
|
||||
(home-emacs-ace-link-configuration-configurations config)))))
|
||||
|
||||
(define (add-emacs-ace-link-packages config)
|
||||
|
|
Loading…
Reference in a new issue