Merge pull request #821 from patrl/agda

:lang agda (done)
This commit is contained in:
Henrik Lissner 2018-09-21 11:09:31 -04:00 committed by GitHub
commit 3fab4fbaba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,9 @@
#+TITLE: :lang agda
This module adds support for the [[http://wiki.portal.chalmers.se/agda/pmwiki.php][agda]] programming language.
Emacs support is included in the agda release (you can find installation
instructions [[https://agda.readthedocs.io/en/latest/getting-started/installation.html][here]]). This module attempts to find the location of ~agda2.el~ via
the ~agda-mode locate~ command that comes with the agda release. Users can set
this manually by setting the ~+agda2-dir~ variable.

View file

@ -0,0 +1,38 @@
;;; 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"))))
(def-package! agda2
:when +agda-dir
:load-path +agda-dir)
(def-package! agda2-mode
:defer t
:config
(map! :map agda2-mode-map
:localleader
:n "?" #'agda2-show-goals
:n "." #'agda2-goal-and-context-and-inferred
:n "," #'agda2-goal-and-context
:n "=" #'agda2-show-constraints
:n "SPC" #'agda2-give
:n "a" #'agda2-auto
:n "c" #'agda2-make-case
:n "d" #'agda2-infer-type-maybe-toplevel
:n "e" #'agda2-show-context
:n "gG" #'agda2-go-back
:n "h" #'agda2-helper-function-type
:n "l" #'agda2-load
:n "n" #'agda2-compute-normalised-maybe-toplevel
:n "p" #'agda2-module-contents-maybe-toplevel
:n "r" #'agda2-refine
:n "s" #'agda2-solveAll
:n "t" #'agda2-goal-type
:n "w" #'agda2-why-in-scope-maybe-toplevel
:n "xc" #'agda2-compile
:n "xd" #'agda2-remove-annotations
:n "xh" #'agda2-display-implicit-arguments
:n "xq" #'agda2-quit
:n "xr" #'agda2-restart))

View file

@ -0,0 +1,5 @@
;; -*- 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"))