Add emacs-yasnippet-capf to my configuration
This commit is contained in:
parent
ee001a23f5
commit
edfc8c2558
3 changed files with 66 additions and 3 deletions
|
@ -72,7 +72,8 @@
|
|||
#:select (home-emacs-service-type
|
||||
home-emacs-configuration
|
||||
home-emacs-helpful-service-type
|
||||
home-emacs-helpful-configuration))
|
||||
home-emacs-helpful-configuration
|
||||
home-emacs-yasnippet-capf-service-type))
|
||||
#:use-module ((oni home services environment)
|
||||
#:select (home-environment-service))
|
||||
#:use-module ((oni home services flameshot)
|
||||
|
@ -325,7 +326,8 @@
|
|||
(home-emacs-helpful-configuration
|
||||
(configurations
|
||||
(list
|
||||
(local-file "../services/emacs/helpful.el")))))
|
||||
(local-file "../services/emacs/oni-helpful.el")))))
|
||||
(service home-emacs-yasnippet-capf-service-type)
|
||||
|
||||
(service home-flameshot-service-type)
|
||||
|
||||
|
|
|
@ -25,11 +25,17 @@
|
|||
#:use-module ((guix packages)
|
||||
#:select (package?))
|
||||
|
||||
#:use-module ((oni packages emacs)
|
||||
#:select (emacs-yasnippet-capf))
|
||||
|
||||
#:export (home-emacs-service-type
|
||||
home-emacs-configuration
|
||||
|
||||
home-emacs-helpful-service-type
|
||||
home-emacs-helpful-configuration))
|
||||
home-emacs-helpful-configuration
|
||||
|
||||
home-emacs-yasnippet-capf-service-type
|
||||
home-emacs-yasnippet-capf-configuration))
|
||||
|
||||
(define-configuration/no-serialization home-emacs-extension
|
||||
(configurations
|
||||
|
@ -119,3 +125,36 @@
|
|||
(compose identity)
|
||||
(default-value (home-emacs-helpful-configuration))
|
||||
(description "Install and configure emacs-helpful.")))
|
||||
|
||||
(define-configuration/no-serialization home-emacs-yasnippet-capf-configuration
|
||||
(package
|
||||
(package emacs-yasnippet-capf)
|
||||
"Package to use for setting emacs-yasnippet-capf.")
|
||||
(configurations
|
||||
(text-config '())
|
||||
"Configuration for emacs-yasnippet-capf."))
|
||||
|
||||
(define (add-emacs-yasnippet-capf config)
|
||||
(home-emacs-extension
|
||||
(configurations
|
||||
(append
|
||||
(list (mixed-text-file "yasnippet-capf-config"
|
||||
"(with-eval-after-load 'minibuffer (add-to-list 'completions-at-point-functions #'yasnippet-capf))\n"))
|
||||
(home-emacs-yasnippet-capf-configuration-configurations config)))))
|
||||
|
||||
(define (add-emacs-yasnippet-capf-packages config)
|
||||
(list (home-emacs-yasnippet-capf-configuration-package config)))
|
||||
|
||||
(define home-emacs-yasnippet-capf-service-type
|
||||
(service-type
|
||||
(name 'home-yasnippet-capf)
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-emacs-service-type
|
||||
add-emacs-yasnippet-capf)
|
||||
(service-extension
|
||||
home-profile-service-type
|
||||
add-emacs-yasnippet-capf-packages)))
|
||||
(compose identity)
|
||||
(default-value (home-emacs-yasnippet-capf-configuration))
|
||||
(description "Install and configure emacs-yasnippet-capf.")))
|
||||
|
|
|
@ -390,3 +390,25 @@ key features.")
|
|||
new-theme for a while. I couldn't think of a name so I named it after him.")
|
||||
(license license:gpl3+))))
|
||||
|
||||
(define-public emacs-yasnippet-capf
|
||||
(let ((commit "40654214db7a44db3a99321447632b43a10fae57")
|
||||
(revision "0"))
|
||||
(package
|
||||
(name "emacs-yasnippet-capf")
|
||||
(version (git-version "7.0.0" revision commit))
|
||||
(source
|
||||
(origin
|
||||
(uri (git-reference
|
||||
(url "https://github.com/elken/yasnippet-capf.git")
|
||||
(commit commit)))
|
||||
(method git-fetch)
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "1kywl7jblrmixr0vwycpil5hyk4p5qlc3gxg9w25xga4jj91r663"))))
|
||||
(propagated-inputs
|
||||
(list emacs-yasnippet))
|
||||
(build-system emacs-build-system)
|
||||
(home-page "https://github.com/elken/yasnippet-capf")
|
||||
(synopsis "Completion-At-Point Extension for YASnippet")
|
||||
(description "A simple capf (Completion-At-Point Function) for completing yasnippet snippets.")
|
||||
(license license:gpl3))))
|
||||
|
|
Loading…
Reference in a new issue