From 150273d74199f0c32a2b8594ba10e05829d7c929 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 29 Aug 2023 22:24:25 -0700 Subject: Add zsh-autopair configuration --- oni/home/services/zsh.scm | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'oni/home/services') 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."))) -- cgit v1.2.3-54-g00ecf