Add zsh-autopair configuration

This commit is contained in:
Tom Willemse 2023-08-29 22:24:25 -07:00
parent 0e0fccec88
commit 150273d741
2 changed files with 36 additions and 2 deletions

View file

@ -110,7 +110,8 @@
#:select (home-inkplate-display-service-type)) #:select (home-inkplate-display-service-type))
#:use-module ((oni home services zsh) #:use-module ((oni home services zsh)
#:select (home-zsh-syntax-highlighting-service-type #: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) #:use-module ((oni packages count-emails)
#:select (count-emails)) #:select (count-emails))
#:use-module ((oni packages emacs) #:use-module ((oni packages emacs)
@ -271,6 +272,7 @@
;; configuration last. ;; configuration last.
(service home-zsh-syntax-highlighting-service-type) (service home-zsh-syntax-highlighting-service-type)
(service home-zsh-autosuggestions-service-type) (service home-zsh-autosuggestions-service-type)
(service home-zsh-autopair-service-type)
(simple-service 'my-channel-service (simple-service 'my-channel-service
home-channels-service-type home-channels-service-type

View file

@ -13,7 +13,9 @@
home-zsh-syntax-highlighting-service-type home-zsh-syntax-highlighting-service-type
home-zsh-syntax-highlighting-configuration home-zsh-syntax-highlighting-configuration
home-zsh-contextual-abbrevs-service-type 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 (define-configuration/no-serialization home-zsh-autosuggestions-configuration
(package (package
@ -105,3 +107,33 @@
(compose identity) (compose identity)
(default-value (home-zsh-contextual-abbrevs-configuration)) (default-value (home-zsh-contextual-abbrevs-configuration))
(description "Install and configure zsh-contextual-abbrevs."))) (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.")))