diff options
Diffstat (limited to 'oni/home')
-rw-r--r-- | oni/home/config/rincewind.scm | 4 | ||||
-rw-r--r-- | oni/home/services/zsh.scm | 34 |
2 files changed, 36 insertions, 2 deletions
diff --git a/oni/home/config/rincewind.scm b/oni/home/config/rincewind.scm index 540e26e..a36b84b 100644 --- a/oni/home/config/rincewind.scm +++ b/oni/home/config/rincewind.scm @@ -110,7 +110,8 @@ #:select (home-inkplate-display-service-type)) #:use-module ((oni home services zsh) #:select (home-zsh-syntax-highlighting-service-type - home-zsh-autosuggestions-service-type)) + home-zsh-autosuggestions-service-type + home-zsh-autopair-service-type)) #:use-module ((oni packages count-emails) #:select (count-emails)) #:use-module ((oni packages emacs) @@ -271,6 +272,7 @@ ;; configuration last. (service home-zsh-syntax-highlighting-service-type) (service home-zsh-autosuggestions-service-type) + (service home-zsh-autopair-service-type) (simple-service 'my-channel-service home-channels-service-type diff --git a/oni/home/services/zsh.scm b/oni/home/services/zsh.scm index d89a237..a003db0 100644 --- a/oni/home/services/zsh.scm +++ b/oni/home/services/zsh.scm @@ -13,7 +13,9 @@ home-zsh-syntax-highlighting-service-type home-zsh-syntax-highlighting-configuration home-zsh-contextual-abbrevs-service-type - home-zsh-contextual-abbrevs-configuration)) + home-zsh-contextual-abbrevs-configuration + home-zsh-autopair-service-type + home-zsh-autopair-configuration)) (define-configuration/no-serialization home-zsh-autosuggestions-configuration (package @@ -105,3 +107,33 @@ (compose identity) (default-value (home-zsh-contextual-abbrevs-configuration)) (description "Install and configure zsh-contextual-abbrevs."))) + +(define (add-zsh-autopair config) + (home-zsh-extension + (zshrc + (list + (mixed-text-file + "zshrc" + "source " (home-zsh-autopair-configuration-package config) "/share/zsh/plugins/zsh-autopair/zsh-autopair.zsh"))))) + +(define-configuration/no-serialization home-zsh-autopair-configuration + (package + (package zsh-autopair) + "Package to use for setting zsh-autopair.")) + +(define (add-zsh-autopair-packages config) + (list (home-zsh-autopair-configuration-package config))) + +(define home-zsh-autopair-service-type + (service-type + (name 'home-zsh-autopair) + (extensions + (list (service-extension + home-zsh-service-type + add-zsh-autopair) + (service-extension + home-profile-service-type + add-zsh-autopair-packages))) + (compose identity) + (default-value (home-zsh-autopair-configuration)) + (description "Install and configure zsh-autopair."))) |