conao3 / leaf-keywords.el

Additional leaf.el keywords for external packages
GNU General Public License v3.0
31 stars 10 forks source link

elpaca integration #155

Closed Cletip closed 3 months ago

Cletip commented 1 year ago

Hello !

I have just switched from straight to elpaca, which is another "package installer". I thought it would be a good idea to take the plunge with use-package too. Is there a leaf integration with elpaca ?

dXu23 commented 1 year ago

I think someone managed to get it work: https://github.com/progfolio/elpaca/issues/7#issuecomment-1406432109

Cletip commented 1 year ago

Ok perfect, however I think that this issue should be closed when the integration is perfectly done. So I'll leave it open for now.

formula-spectre commented 11 months ago

any update on a native :elpaca keyword? or are we still at the leaf-elpaca macro method?

conao3 commented 11 months ago

(transfer due to related to adding keyword for third party package

Cletip commented 11 months ago

I did this, I hope that works without more configuration

  (setup-define :elpaca
    (lambda (order &rest body)
      (if (eq order t)
      `(elpaca ,(setup-get 'feature) (setup ,(setup-get 'feature) ,@body))
    `(elpaca ,order (setup ,(elpaca--first order) ,@body))))
    :documentation "TODO"
    :shorthand (lambda (args)
         (elpaca--first (cadr args))
         )
    )

Examples :

Simple :

(setup (:elpaca org-ql))
(setup (:elpaca aggressive-indent
          (:hook-into emacs-lisp-mode-hook)))

Complexe :


  (setup test
    ;; some code before. A catch can be present here
    (:if (a-condition-here-not-deferred))

    ;; a package to be downloaded AND configuration deferred
    (:elpaca 
     ;; what we're downloading
     (elfeed-score :type git :host github :repo "sp1ff/elfeed-score")

     ;; moreover, as :elpaca sends to setup, a catch might be present here

     ;; remaining code here, compatible with setup!
     (:when-loaded
       (message "Package loaded !"))
     )

    ;; code afterwards not deferred. Maybe unnecessary ?
    (other-code-here-not-deferred)
    )
conao3 commented 3 months ago

156 merged, thanks for @yk-kd 🎉