GithubHelp home page GithubHelp logo

flycheck-posframe's Introduction

flycheck-posframe

License GPL 3 MELPA Build Status

Display flycheck error messages via posframe.

flycheck-posframe screenshot

Installation

MELPA

The preferred way to install flycheck-posframe is via MELPA - then you can just M-x package-install RET flycheck-posframe RET

To enable then simply add the following to your init file:

(with-eval-after-load 'flycheck
  (require 'flycheck-posframe)
  (add-hook 'flycheck-mode-hook #'flycheck-posframe-mode))

We recommend to use use-package to make this automatic:

(use-package flycheck-posframe
  :ensure t
  :after flycheck
  :config (add-hook 'flycheck-mode-hook #'flycheck-posframe-mode))

Manual

If you would like to install the package manually, download or clone it and place within Emacs' load-path, then you can require it in your init file like this:

(require 'flycheck-posframe)
(add-hook 'flycheck-mode-hook #'flycheck-posframe-mode)

NOTE: This will also require the manual installation of flycheck if you have not done so already.

Configuration

Default Pretty Configuration

Calling (flycheck-posframe-configure-pretty-defaults) will configure flycheck-posframe to show warnings and errors with nicer faces (inheriting from warning and error respectively), and set the prefix for each to nicer unicode characters.

Manual Configuration

There are a few settings which can be configured to customise the display of error messages. These include the faces which are used to show the error messages flycheck-posframe-info-face, flycheck-posframe-warning-face and flycheck-posframe-error-face and a string which is used as the prefix for each message flycheck-posframe-info-prefix``flycheck-posframe-warning-prefix and flycheck-posframe-error-prefix. The background colour can be specified as the background attribute of the flycheck-posframe-background-face face. The position, as well as the border width and colour can also be customised via the flycheck-posframe-position, flycheck-posframe-border-widthandflycheck-posframe-border-color` variables respectively.

flycheck-posframe-LEVEL-face

By default each of flycheck-posframe-LEVEL-face inherits from the default face so should appear like the rest of the text in the buffer. If however you want to ensure error messages stand-out you could configure them to inherit from the error face:

(set-face-attribute 'flycheck-posframe-error-face nil :inherit 'error)

flycheck-posframe-LEVEL-prefix

By default flycheck-posframe-LEVEL-prefix is set to "➤ ". If however you wanted to show each warning message prefixed with the unicode WARNING SIGN symbol (U+26A0) "⚠ " you could configure it as follows:

(setq flycheck-posframe-warning-prefix "\u26a0 ")

flycheck-posframe-background-face

By default flycheck-posframe-background-face inherits from the default face, so the background colour should be the same as the standard window frame background colour. This can be customised like any other face (ie. by using customize-face or manually setting the :background face attribute)

flycheck-posframe-border-face

By default flycheck-posframe-border-face inherits from the default face, so the background colour should be the same as the standard foreground colour. This can be customised like any other face (ie. by using customize-face or manually setting the :foreground face attribute)

flycheck-posframe-border-width

By default flycheck-posframe-border-width is zero but this can be set to an integer number of pixels to specify the width of the border.

flycheck-posframe-position

By default flycheck-posframe-position is set to point-bottom-left-corner so that errors are shown just below point. This can be customised to any of the existing positions supported by posframe. For example, to display errors at the bottom-left of the window:

(setq flycheck-posframe-position 'window-bottom-left-corner)

License

Copyright © 2019 Alex Murray

Distributed under GNU GPL, version 3.

flycheck-posframe's People

Contributors

alexmurray avatar blahgeek avatar anonimitoraf avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

bigbuger

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.