Use straight for agda

We can fetch the mode directly from straight. There's no need to rely on
having this .el file installed for us. Now agda's el files can be edited
directly like all other emacs packages.

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2019-08-29 20:07:41 +07:00
parent 21883d9700
commit 88fc054919
3 changed files with 45 additions and 44 deletions

View file

@ -1,17 +1,8 @@
;;; lang/agda/config.el -*- lexical-binding: t; -*-
(defvar +agda-dir
(when (executable-find "agda-mode")
(file-name-directory (shell-command-to-string "agda-mode locate"))))
(use-package! agda2
:when +agda-dir
:load-path +agda-dir)
(use-package! agda2-mode
:defer t
:config
(map! :map agda2-mode-map
(map!
:after agda2-mode
:map agda2-mode-map
:localleader
"?" #'agda2-show-goals
"." #'agda2-goal-and-context-and-inferred
@ -38,4 +29,4 @@
"d" #'agda2-remove-annotations
"h" #'agda2-display-implicit-arguments
"q" #'agda2-quit
"r" #'agda2-restart)))
"r" #'agda2-restart))

View file

@ -1,5 +0,0 @@
;; -*- lexical-binding: t; no-byte-compile: t; -*-
;;; lang/agda/doctor.el
(unless (executable-find "agda-mode")
(warn! "Couldn't find agda-mode. Agda support won't work"))

View file

@ -0,0 +1,15 @@
;; -*- no-byte-compile: t; -*-
;;; lang/agda/packages.el
(package! agda-input
:recipe
(:host github :repo "agda/agda"
:files ("src/data/emacs-mode/agda-input.el")))
(package! agda2-mode
:recipe
(:host github :repo "agda/agda"
:files
("src/data/emacs-mode/*.el"
(:exclude "agda-input.el"))))