β€οΈ Please sponsor me if you like this package

A modern, aesthetic overlay display for Flycheck and Flymake in Emacs. Flyover is a full featured package with tons of features for you to customize.
- π¨ Beautiful, customizable overlays for error display and theme aware
- π¦ Different styles for errors, warnings, and info messages
- π Real-time overlay updates while editing
- π‘ Smart positioning and formatting of error messages
- π― Efficient overlay management
- π Markdown-style syntax highlighting in messages
- Download
flyover.el
- Add to your load path:
(add-to-list 'load-path "/path/to/flyover")
(require 'flyover)
;; Enable flyover-mode globally
(add-hook 'flycheck-mode-hook #'flyover-mode)
;; Configure which error levels to display
;; Possible values: error, warning, info
(setq flyover-levels '(error warning info)) ; Show all levels
;; (setq flyover-levels '(error warning)) ; Show only errors and warnings
;; (setq flyover-levels '(error)) ; Show only errors
;; Use theme colors for error/warning/info faces
(setq flyover-use-theme-colors t)
;; Adjust background lightness (lower values = darker)
(setq flyover-background-lightness 45)
;; Make icon background darker than foreground
(setq flyover-percent-darker 40)
(setq flyover-text-tint 'lighter) ;; or 'darker or nil
;; "Percentage to lighten or darken the text when tinting is enabled."
(setq flyover-text-tint-percent 50)
You can customize the appearance of overlays by modifying these faces:
(custom-set-faces
'(flyover-error
((t :background "#453246"
:foreground "#ea8faa"
:height 0.9
:weight normal)))
'(flyover-warning
((t :background "#331100"
:foreground "#DCA561"
:height 0.9
:weight normal)))
'(flyover-info
((t :background "#374243"
:foreground "#a8e3a9"
:height 0.9
:weight normal))))
Once enabled, flyover
will automatically display error messages as overlays below the corresponding line. The overlays will:
- Show errors in red with appropriate background
- Display warnings in yellow/orange
- Show information messages in green
- Highlight code snippets and symbols in messages
- Update in real-time as you type
- Clear automatically when errors are fixed
;; Choose which checkers to use (flycheck, flymake, or both)
(setq flyover-checkers '(flycheck flymake))
;; Enable debug messages
(setq flyover-debug nil)
;; Time in seconds to wait before checking and displaying errors after a change
(setq flyover-debounce-interval 0.2)
;; Number of lines below the error line to display the overlay
;; Default is 1 (next line), set to 0 for same line, 2 for two lines below, etc.
(setq flyover-line-position-offset 1)
;; Enable wrapping of long error messages across multiple lines
(setq flyover-wrap-messages t)
;; Maximum length of each line when wrapping messages
(setq flyover-max-line-length 80)
You can customize the icons used for different types of Flycheck messages in the overlay display. These settings allow you to define custom icons for information, warning, and error messages.
;;; Icons
(setq flyover-info-icon "π")
(setq flyover-warning-icon "β ")
(setq flyover-error-icon "β")
;;; Icon padding
;;; You might want to adjust this setting if you icons are not centererd or if you more or less space.fs
(setq flyover-icon-left-padding 0.9)
(setq flyover-icon-right-padding 0.9)
You can customize the appearance of the error indicators using various line and arrow styles through the flyover-virtual-line-type
variable:
(setq flyover-virtual-line-type 'curved-dotted-arrow)
;;; Overide virtual-line-type with your own
(setq flyover-virtual-line-icon "β°ββ") ;;; default its nil
Style Name | Display | Description |
---|---|---|
nil |
No indicator | |
line-no-arrow |
βββ | Straight line |
curved-line-no-arrow |
β°ββ | Curved line |
double-line-no-arrow |
βββ | Double line |
bol |
βββ | Bold line |
dotted-line-no-arrow |
βββ | Dotted line |
straight-arrow |
ββββΊ | Straight line with arrow |
double-line-arrow |
ββββΊ | Double line with arrow |
bold-arrow |
ββββΊ | Bold line with arrow |
dotted-arrow |
ββββΊ | Dotted line with arrow |
curved-arrow |
β°βββΊ | Curved line with arrow (default) |
curved-bold-arrow |
β°βββΊ | Curved bold line with arrow |
curved-double-arrow |
β°βββΊ | Curved double line with arrow |
curved-dotted-arrow |
β°βββΊ | Curved dotted line with arrow |
;;; Hide checker name for a cleaner UI
(setq flyover-hide-checker-name t)
;;; show at end of the line instead.
(setq flyover-show-at-eol t)
;;; Hide overlay when cursor is at same line, good for show-at-eol.
(setq flyover-hide-when-cursor-is-on-same-line t)
;;; Show an arrow (or icon of your choice) before the error to highlight the error a bit more.
(setq flyover-show-virtual-line t)
The package includes comprehensive tests for the message wrapping functionality:
# Run core wrapping tests (no dependencies required)
emacs -batch -l test-wrapping.el
# Run full test suite (requires flycheck)
emacs -batch -l flyover.el -l flycheck-overlay-test.el -f ert-run-tests-batch-and-exit
# Interactive testing
# In Emacs: M-x load-file RET flyover-test.el RET
# Then: M-x flyover-run-tests
- Message wrapping with various lengths
- Multi-line display functionality
- Line position offset behavior
- Edge cases (empty messages, single words, exact lengths)
- Integration with flycheck error objects
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Add tests for new functionality in
flyover-test.el
- Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Thanks to the Flycheck team for the excellent error checking framework
- Inspired by various overlay-based error display implementations
Mikael Konradsson [email protected]