Code Monkey home page Code Monkey logo

neomake's Introduction

Maintainers needed! Contact an organization owner if interested.

Build Status

Neomake

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

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

Starting from Vim version 7.4.2260 Neomake takes advantage of Vim's async support.

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.

Explanation for the strings making up the errorformat can be found by typing :h errorformat in Neovim/Vim.

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

Plugin documentation

For more detailed documentation please refer to the plugin's help (:h neomake).

Makers provided by Neomake as of this writing are:

Applescript:

  • osacompile

C:

  • clang
  • gcc
  • clang-tidy
  • checkpatch

C++:

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

CUDA:

  • nvcc

Coffeescript:

  • coffeelint

CSS:

  • csslint
  • stylelint

D:

  • dmd

Elixir:

  • credo [not enabled by default]
  • dogma [not enabled by default]
  • elixirc

Erlang:

  • erlc

Go:

  • go
  • golint
  • go vet

Haskell:

  • hlint
  • ghc-mod
  • hdevtools
  • cabal

Java:

  • javac

Javascript:

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

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
  • vulture [not enabled by default]
  • mypy [not enabled by default]

Ruby:

  • mri
  • jruby
  • rubocop
  • reek
  • rubylint

Rust:

  • rustc

Scala:

  • scalac
  • scalastyle

scss:

sh:

  • sh
  • shellcheck

Slim:

Standard ML:

  • smlnj

Stylus:

SQL:

TCL:

  • Nagelfar

Tex/Latex:

  • chktex
  • lacheck

TypeScript:

  • tsc

VHDL:

Vimscript:

  • vint

  • vimlint

    It can be installed using npm: node-vimlint.

    Or you could create a wrapper script vimlint and add it to your PATH:

    #!/bin/sh
    ~/Vcs/vim-vimlint/bin/vimlint.sh -l ~/Vcs/vim-vimlint -p ~/Vcs/vim-vimlparser "$@"

YAML:

Zsh:

  • shellcheck (not enabled by default, current versions do not support Zsh)
  • zsh

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.

neomake's People

Contributors

benekastah avatar blueyed avatar lily-mara avatar neki avatar saaguero avatar sbdchd avatar vividboarder avatar davidosomething avatar hauxir avatar wsdjeg avatar paretje avatar vito-c avatar gmacon avatar junkblocker avatar euclio avatar alex-ketch avatar eugen0329 avatar cartolari avatar baabelfish avatar opodartho avatar tranquility avatar languitar avatar jabbalaci avatar ivalkeen avatar ianks avatar elentok avatar dannydulai avatar bronzehedwick avatar brendanjerwin avatar antoyo avatar

Watchers

James Cloos avatar  avatar

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.