Skip to content
/ attrap Public

ATtempt To Repair At Point (emacs flycheck extension)

License

Notifications You must be signed in to change notification settings

jyp/attrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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/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, ~dante~ and hlint. Support for other checkers can be added dynamically (See M-x customize-group attrap for the documentation).

Installation with use-package:

(use-package attrap
  :ensure t
  :bind (("C-x /" . attrap-attrap))) ;; use any binding of your choice

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:

(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)))

Unfortunately there is no direct support for flycheck at the moment.

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

export LANG=en_US.UTF-8 

About

ATtempt To Repair At Point (emacs flycheck extension)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •