Add Optional Accept Button to Linter Message
Add Optional Accept Button to Linter Message

Some linters (for instance haskell's hlint) suggest better code that
may replace offending expressions. It makes sense to have a button to
click on that removes the offending range and inserts the fix the
linter proposed.

http://imgur.com/ocTqVtk (see bottom right!)

This commit adds such a feature: if a message has an optional field
called `replacement` (of type string), the message window will offer
an "Accept!" option next to the source location. Clicking this option
replaces the marked range with the replacement string.

kaeluka/linter