ATtempt To Repair At Point (emacs flycheck extension)
Emacs Lisp
45
100 commits
updated Aug 6, 2026
* Attrap: ATtempt To Repair At Point
This is an Emacs minor mode which automates the application of
hints in messages reported through flymake or flycheck.
[[https://melpa.org/packages/attrap-badge.svg]]
[[https://stable.melpa.org/#/dante][https://stable.melpa.org/packages/attrap-badge.svg]]
Attrap! provides a single entry point to attempt to fix the error at
point.
Invoke the command ~attrap-attrap~ when point is on a flymake or flycheck error,
and check the results. Attrap! currently comes with fixers for
~emacs-lisp~, [[https://github.com/jyp/dante/][~dante~]] and ~hlint~. Support for other
checkers can be added dynamically (See ~M-x customize-group attrap~ for the documentation).
* Installation with ~use-package~:
#+BEGIN_SRC elisp
(use-package attrap
:ensure t
:bind (("C-x /" . attrap-attrap))) ;; use any binding of your choice
#+END_SRC
* Configuration of the ~hlint~ checker
Attrap requires a flymake checker for hlint. It should be setup by
adding the appropriate hook to the haskell mode:
#+begin_src elisp
(add-hook 'haskell-mode-hook
(defun my/haskell-hook ()
(require 'attrap)
(require 'flymake-flycheck)
(flymake-mode)
(add-hook 'flymake-diagnostic-functions 'attrap-flymake-hlint nil t)))
#+end_src
Unfortunately there is no direct support for flycheck at the moment.
# , you can chain activate the hlint
# checker in addition to the dante checker by calling
# ~flycheck-add-next-checker~ as follows:
# #+BEGIN_SRC elisp
# (flycheck-add-next-checker 'haskell-dante '(info . haskell-hlint))
# #+END_SRC
* Note for GHC users
Attrap assumes that GHC outputs unicode symbols in error messages,
which will happen only if $LANG is set to a proper value, such as
#+BEGIN_SRC shell
export LANG=en_US.UTF-8
#+END_SRC
Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.
Emacs Lisp
100.0%
ATtempt To Repair At Point (emacs flycheck extension)
Emacs Lisp
45
100 commits
updated Aug 6, 2026
* Attrap: ATtempt To Repair At Point
This is an Emacs minor mode which automates the application of
hints in messages reported through flymake or flycheck.
[[https://melpa.org/packages/attrap-badge.svg]]
[[https://stable.melpa.org/#/dante][https://stable.melpa.org/packages/attrap-badge.svg]]
Attrap! provides a single entry point to attempt to fix the error at
point.
Invoke the command ~attrap-attrap~ when point is on a flymake or flycheck error,
and check the results. Attrap! currently comes with fixers for
~emacs-lisp~, [[https://github.com/jyp/dante/][~dante~]] and ~hlint~. Support for other
checkers can be added dynamically (See ~M-x customize-group attrap~ for the documentation).
* Installation with ~use-package~:
#+BEGIN_SRC elisp
(use-package attrap
:ensure t
:bind (("C-x /" . attrap-attrap))) ;; use any binding of your choice
#+END_SRC
* Configuration of the ~hlint~ checker
Attrap requires a flymake checker for hlint. It should be setup by
adding the appropriate hook to the haskell mode:
#+begin_src elisp
(add-hook 'haskell-mode-hook
(defun my/haskell-hook ()
(require 'attrap)
(require 'flymake-flycheck)
(flymake-mode)
(add-hook 'flymake-diagnostic-functions 'attrap-flymake-hlint nil t)))
#+end_src
Unfortunately there is no direct support for flycheck at the moment.
# , you can chain activate the hlint
# checker in addition to the dante checker by calling
# ~flycheck-add-next-checker~ as follows:
# #+BEGIN_SRC elisp
# (flycheck-add-next-checker 'haskell-dante '(info . haskell-hlint))
# #+END_SRC
* Note for GHC users
Attrap assumes that GHC outputs unicode symbols in error messages,
which will happen only if $LANG is set to a proper value, such as
#+BEGIN_SRC shell
export LANG=en_US.UTF-8
#+END_SRC
Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.
Emacs Lisp
100.0%