Skip to content

Commit

Permalink
Add quick-peek customization to README
Browse files Browse the repository at this point in the history
  • Loading branch information
fmdkdd committed May 25, 2018
1 parent da520ad commit 86925d1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

[![License GPL 3](https://img.shields.io/github/license/flycheck/flycheck-inline.svg)][LICENCE]

This is an extension for [Flycheck](http://www.flycheck.org/). It implements a
minor-mode for displaying errors from Flycheck right below their reporting
location, using overlays.
This is an extension for [Flycheck][]. It implements a minor-mode for displaying
errors from Flycheck right below their reporting location, using overlays.

![flycheck-inline warning preview](screenshots/warning.gif)

Expand Down Expand Up @@ -37,13 +36,31 @@ flycheck-inline RET`.
If you wish to change the delay before errors are displayed, see
`flycheck-display-errors-delay`.

You can change the way overlays are created by customizing
`flycheck-inline-display-function` and `flychjeck-inline-clear-function`. Here
is an example using [quick-peek][] to display the overlays which adds bars
around them:

```emacs-lisp
(setq flycheck-inline-display-function
(lambda (msg pos)
(let* ((ov (quick-peek-overlay-ensure-at pos))
(contents (quick-peek-overlay-contents ov)))
(setf (quick-peek-overlay-contents ov)
(concat contents (when contents "\n") msg))
(quick-peek-update ov)))
flycheck-inline-clear-function #'quick-peek-hide)
```

The result:

![flycheck-inline overlays with quick-peek](screenshots/quick-peek.png)

## Contributing

We welcome all kinds of contributions, whether you write patches, open pull
requests, write documentation, help others with Flycheck issues, or just tell
other people about your experiences with Flycheck. Please take a look at
our [Contributor’s Guide][contrib] for help and guidance about contributing to
Flycheck or to this extension.
requests, write documentation, help others with issues, or just tell other
people about your experiences with this extension.

## License

Expand All @@ -62,3 +79,5 @@ this program. If not, see http://www.gnu.org/licenses/.
[LICENCE]: https://github.com/flycheck/flycheck-licence/blob/master/LICENCE
[contrib]: http://www.flycheck.org/en/latest/contributor/contributing.html
[flycheck-rust]: https://github.com/flycheck/flycheck-rust
[Flycheck]: http://www.flycheck.org/
[quick-peek]: https://github.com/cpitclaudel/quick-peek
Binary file added screenshots/quick-peek.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 86925d1

Please sign in to comment.