❤️ Please sponsor me if you like this package
A modern, aesthetic overlay display for Flycheck errors in Emacs. Flycheck by displaying errors, warnings, and information messages using customizable overlays.
- 🎨 Beautiful, customizable overlays for error display
- 🚦 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
flycheck-overlay.el
- Add to your load path:
(add-to-list 'load-path "/path/to/flycheck-overlay")
(require 'flycheck-overlay)
;; Enable flycheck-overlay-mode globally
(add-hook 'flycheck-mode-hook #'flycheck-overlay-mode)
You can customize the appearance of overlays by modifying these faces:
(custom-set-faces
'(flycheck-overlay-error
((t :background "#453246"
:foreground "#ea8faa"
:height 0.9
:weight normal)))
'(flycheck-overlay-warning
((t :background "#331100"
:foreground "#DCA561"
:height 0.9
:weight normal)))
'(flycheck-overlay-info
((t :background "#374243"
:foreground "#a8e3a9"
:height 0.9
:weight normal))))
Once enabled, flycheck-overlay
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
;;; Time in seconds to wait before checking and displaying errors after a change.
(setq flycheck-overlay-debounce-interval 0.2)
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 flycheck-overlay-info-icon "🛈")
(setq flycheck-overlay-warning-icon "⚠")
(setq flycheck-overlay-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 flycheck-overlay-icon-left-padding 0.9)
(setq flycheck-overlay-icon-right-padding 0.9)
You can customize the appearance of the error indicators using various line and arrow styles through the flycheck-overlay-virtual-line-type
variable:
(setq flycheck-overlay-virtual-line-type 'curved-dotted-arrow)
;;; Overide virtual-line-type with your own
(setq flycheck-overlay-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 flycheck-overlay-hide-checker-name t)
;;; show at end of the line instead.
(setq flycheck-overlay-show-at-eol t)
;;; Hide overlay when cursor is at same line good for shot-at-eol.
(setq flycheck-overlay-hide-when-cusor-is-on-same-line t)
;;; Show an arrow (or icon of your choice) before the error to highlight the error a bit more.
(setq flycheck-overlay-show-virtual-line t)
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - 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]