Quickstart

Enable Flycheck

Enable Flycheck globally by adding the following to your init.el, and restart Emacs:

(add-hook 'after-init-hook #'global-flycheck-mode)

Install some syntax checker tools

Install some syntax checking tools for the programming or markup language you are using. Take a look at the list of supported languages to check what languages and tools are supported.

For Python:

$ pip install --user pylint

Or for Ruby:

$ gem install rubocop ruby-lint

Or for Haskell:

$ brew install haskell-platform
$ cabal install hlint

The language list also lists the available options for each syntax checker. Take a look at these to tune the syntax checkers to your needs, and read how to use these options.

Check syntax in a buffer

Flycheck will now check syntax using these tools, when you visit a buffer in any of these languages. Syntax checking happens automatically when you save the buffer or make any changes. Flycheck highlights errors and warnings in the buffer, indicates them in the fringe, and reports their numbers in the mode line.

You can also manually check a buffer with C-c ! c (flycheck-buffer).

Explore the menu

All Flycheck commands are available in the Emacs menu at Tools ‣ Syntax Checking. Explore this menu to see what features Flycheck has to offer.

../_images/flycheck-menu.png

The menu can also be opened by clicking on the mode line lighter of Flycheck.

../_images/flycheck-mode-line-menu.png

Further reading

  • Usage describes all commands and options in detail.
  • Supported languages has a list of all supported languages, and the corresponding syntax checker tools and their options.