Skip to content

A beautiful inline flycheck overlay for Emacs

License

Notifications You must be signed in to change notification settings

vadimi/flycheck-overlay

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flycheck-overlay

❤️ 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.

Screenshot of overlay-usage for Emacs.

Features

  • 🎨 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

Screenshots

Screenshot of overlay-usage for Emacs. Screenshot of overlay-usage for Emacs.

Installation

Manual Installation

  1. Download flycheck-overlay.el
  2. Add to your load path:
(add-to-list 'load-path "/path/to/flycheck-overlay")
(require 'flycheck-overlay)

Configuration

Basic Setup

;; Enable flycheck-overlay-mode globally
(add-hook 'flycheck-mode-hook #'flycheck-overlay-mode)

Customizing Faces

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

Usage

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

Flycheck Overlay Icons

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.

Icon settings

(defcustom flycheck-overlay-info-icon " "
  "Icon used for information.")

(defcustom flycheck-overlay-warning-icon " "
  "Icon used for warnings.")

(defcustom flycheck-overlay-error-icon " "
  "Icon used for errors.")
  
(defcustom flycheck-overlay-show-at-eol nil
  "Show error messages at the end of the line."
  :type 'boolean
  :group 'flycheck-overlay)

(setq flycheck-overlay-info-icon "🛈")
(setq flycheck-overlay-warning-icon "")
(setq flycheck-overlay-error-icon "")

Visibility settings

(defcustom flycheck-overlay-hide-when-cursor-is-on-same-line nil
  "Hide error messages when the cursor is on the same line."
  :type 'boolean
  :group 'flycheck-overlay)
  
;; Custom icons using different Unicode characters
(setq flycheck-overlay-show-at-eol t) ;; show at end of the line instead.
(setq flycheck-overlay-hide-when-cusor-is-on-same-line t) ;;; Hide overlay when cursor is at same line good for shot-at-eol.

Show or hide checker name

Screenshot of overlay-usage for Emacs. Screenshot of overlay-usage for Emacs.

Show under or after the faulty code

Screenshot of overlay-usage for Emacs. Screenshot of overlay-usage for Emacs.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Acknowledgments

  • Thanks to the Flycheck team for the excellent error checking framework
  • Inspired by various overlay-based error display implementations

Author

Mikael Konradsson [email protected]

About

A beautiful inline flycheck overlay for Emacs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%