Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.
/ neomake Public archive
forked from neomake/neomake

A plugin for asynchronous :make using Neovim's job-control functionality

License

Notifications You must be signed in to change notification settings

KariusDx/neomake

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maintainers needed! Contact an organization owner if interested.

Neomake

A plugin for asynchronous :make using Neovim's job-control functionality. It is inspired by the excellent vim plugins Syntastic and Dispatch.

This plugin also works in ordinary vim, but without the asynchronous benefits.

The minimum Neovim version supported by Neomake is NVIM 0.0.0-alpha+201503292107 (commit 960b9108c). The minimum Vim version supported by Neomake is 7.4.503 (although if you don't use g:neomake_logfile older versions will probably work fine as well).

How to use (basic)

Just set your makeprg and errorformat as normal, and run:

:Neomake!

If your makeprg can take a filename as an input, then you can run :Neomake (no exclamation point) to pass the current file as the first argument. Otherwise, it is simply invoked in vim's current directory with no arguments.

Here's an example of how to run neomake on the current file on every write:

autocmd! BufWritePost * Neomake

The make command will be run in an asynchronous job. The results will be populated in the window's quickfix list for :Neomake! and the location list for :Neomake as the job runs. Run :copen or :lopen to see the whole list.

How to use (advanced)

Taking a page from the book of syntastic, you can configure "makers" (called "checkers" in syntastic) for different filetypes. Here is an example configuration:

let g:neomake_javascript_jshint_maker = {
    \ 'args': ['--verbose'],
    \ 'errorformat': '%A%f: line %l\, col %v\, %m \(%t%*\d\)',
    \ }
let g:neomake_javascript_enabled_makers = ['jshint']

For use with the :Neomake command (makers that run on an individual file), it is critical that makers follow this naming convention:

g:neomake_{ language }_{ makername }_maker

Where { language } is replaced with the name of the language, and { makername } is replaced with the name that you want your maker to have. If your maker does not follow this convention, neomake will not be able to see it, and you will get an error message like { makername } not found.

If the string '%:p' shows up anywhere in the 'args' list, it will be expand()ed to the full path of the current file in place. Otherwise, the full path to the file will be add()ed to the end of the list, unless the maker's 'append_file' option is set to 0. You can customize the program that is called by adding an 'exe' property which should be a string (defaults to the name of the maker).

Once you have created your makers, run :Neomake as normal. Run :Neomake <checker-name> to run only a single checker. Configuring a filetype to use makers will currently cause the makeprg to be ignored (this should be remedied).

Makers provided by neomake as of this writing are:

Applescript:

  • osacompile

C:

  • clang
  • gcc
  • clang-tidy
  • checkpatch

C++:

  • clang++
  • g++
  • clang-tidy

Coffeescript:

  • coffeelint

CSS:

  • csslint
  • stylelint

D:

  • dmd

Erlang:

  • erlc

Go:

  • go
  • golint
  • go vet

Haskell:

  • hlint
  • ghc-mod
  • hdevtools
  • cabal

Java:

  • javac

Javascript:

  • eslint
  • standard
  • jscs
  • jshint
  • jsxhint
  • flow

JSON:

  • jsonlint

Jsx:

  • jsxhint

Lua:

  • luac
  • luacheck

Markdown:

nix:

  • nix-instantiate

Perl:

  • perlcritic

Pug:

Puppet:

  • puppet
  • puppet-lint

Python:

  • pep8
  • flake8
  • pyflakes
  • pylama
  • pylint
  • python

Ruby:

  • mri
  • jruby
  • rubocop
  • reek
  • rubylint

Rust:

  • rustc

Scala:

  • scalac
  • scalastyle

sh:

  • shellcheck

Standard ML:

  • smlnj

SQL:

Tex/Latex:

  • chktex
  • lacheck

TypeScript:

  • tsc

Vimscript:

  • vint

YAML:

Since this list may be out of date, look at autoload/neomake/makers for all supported makers.

If you find this plugin useful, please contribute your maker recipes to the repository! Check out autoload/neomake/makers/**/*.vim to see how that is currently done.

About

A plugin for asynchronous :make using Neovim's job-control functionality

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 99.5%
  • Python 0.5%