All Projects → maralla → Validator.vim

maralla / Validator.vim

Licence: mit
Check syntax on the fly asynchronously.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Validator.vim

Lightline Ale
ALE indicator for the lightline vim plugin
Stars: ✭ 217 (+3.33%)
Mutual labels:  linter, vim-plugin
Neomake
Asynchronous linting and make framework for Neovim/Vim
Stars: ✭ 2,512 (+1096.19%)
Mutual labels:  linter, vim-plugin
Ale
Check syntax in Vim asynchronously and fix files, with Language Server Protocol (LSP) support
Stars: ✭ 11,380 (+5319.05%)
Mutual labels:  linter, vim-plugin
Grunt Eslint
Validate files with ESLint
Stars: ✭ 189 (-10%)
Mutual labels:  linter
Visual Split.vim
Vim plugin to control splits with visual selections or text objects
Stars: ✭ 190 (-9.52%)
Mutual labels:  vim-plugin
Vinux
Swiss Army Knife,Dark power vim config
Stars: ✭ 198 (-5.71%)
Mutual labels:  vim-plugin
Whispers
Identify hardcoded secrets and dangerous behaviours
Stars: ✭ 66 (-68.57%)
Mutual labels:  linter
Tagalong.vim
Change an HTML(ish) opening tag and take the closing one along as well
Stars: ✭ 184 (-12.38%)
Mutual labels:  vim-plugin
Kronos.vim
A simple task and time manager. Project moved here:
Stars: ✭ 205 (-2.38%)
Mutual labels:  vim-plugin
Diktat
Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
Stars: ✭ 196 (-6.67%)
Mutual labels:  linter
Vim Dispatch
dispatch.vim: Asynchronous build and test dispatcher
Stars: ✭ 2,341 (+1014.76%)
Mutual labels:  vim-plugin
Vim Signify
➕ Show a diff using Vim its sign column.
Stars: ✭ 2,390 (+1038.1%)
Mutual labels:  vim-plugin
Vifm.vim
Vim plugin that allows use of vifm as a file picker
Stars: ✭ 197 (-6.19%)
Mutual labels:  vim-plugin
Zlint
X.509 Certificate Linter focused on Web PKI standards and requirements.
Stars: ✭ 190 (-9.52%)
Mutual labels:  linter
Vim Thematic
Alter Vim's appearance to suit your task & environ
Stars: ✭ 204 (-2.86%)
Mutual labels:  vim-plugin
Diagnostic Languageserver
diagnostic language server integrate with linters
Stars: ✭ 186 (-11.43%)
Mutual labels:  linter
Goconst
Find in Go repeated strings that could be replaced by a constant
Stars: ✭ 201 (-4.29%)
Mutual labels:  linter
Markuplint
A Linter for All Markup Languages.
Stars: ✭ 193 (-8.1%)
Mutual labels:  linter
Jupyter Vim
Make Vim talk to Jupyter kernels
Stars: ✭ 194 (-7.62%)
Mutual labels:  vim-plugin
Bellybutton
Custom Python linting through AST expressions
Stars: ✭ 196 (-6.67%)
Mutual labels:  linter

Validator

Build Status

Syntax check framework for vim which checks syntax on the fly asynchronously.

Requirements

You should have a relatively new version of vim which supports such features: job, timers and lambda.

Your vim should be compiled with python or python3.

Validator relies on external syntax checkers, so you need to install the checkers fit for the files you are editting.

Builtin Checkers

  • c/c++, clang-tidy
  • python, flake8
  • cython, cython
  • css, csslint
  • javascript, jshint, eslint, jscs
  • ruby, mri, rubocop
  • json, jsonlint
  • lua, luac, luacheck
  • sh, sh, shellcheck
  • rst, rst2pseudoxml
  • vim, vint, vimlparser
  • go, gofmt, golint, gometalinter
  • rust, cargo check (not instant)

Configuration

Select checkers for a file type:

let g:validator_{filetype}_checkers = ['<checker_name>']

" for example, choose eslint to check javascript:
let g:validator_javascript_checkers = ['eslint']

To customize error message:

let g:validator_error_msg_format = "[ ● %d/%d issues ]"

To auto open quickfix window:

let g:validator_auto_open_quickfix = 1

To handle file type alias:

let g:validator_filetype_map = {'<alias>': '<filetype_supported>'}

" for example
let g:validator_filetype_map = {"python.django": "python"}

Ignore file types:

let g:validator_ignore = ['<filetype>']

To customize the signs colors, you can use the following groups:

" For syntax errors & warnings
ValidatorErrorSign
ValidatorWarningSign

" For style errors & warnings
" (By default, use the same colors as the 2 groups above)
ValidatorStyleErrorSign
ValidatorStyleWarningSign

To show permanently the sign column and prevent annonying behavior when the sign column appear and then it disappears.

sign

let g:validator_permament_sign = 1

To specify the checker executable path or pass checker arguments manually:

" If not specified `<args_name>` is `<filetype>_<checker>`.
let g:validator_<args_name>_args = '<args>'
" If not specified `<binary_name>` is `<filetype>_<checker>`.
let g:validator_<binary_name>_binary = '/path/to/executable'

" For c/c++
let g:validator_clang_tidy_binary = '/path/to/executable'

" For flake8
let g:validator_python_flake8_args = '--max-line-length=120'
let g:validator_python_flake8_binary = '/Users/maralla/.dotfiles/virtualenvs/py27/bin/flake8'

" For rubocop
let g:validator_ruby_rubocop_args = '-f s -c .rubocop.yml'
let g:validator_ruby_rubocop_binary = '/Users/maralla/.rvm/gems/ruby-2.3.0/bin/rubocop'

Install

$ pack install maralla/validator.vim
Plug 'maralla/validator.vim'

Usage

Validator.vim automatically checks syntax in the background when file content changes, so no need to do any trigger manually. If you do want to do a check manually use this command ValidatorCheck. This command is especially useful when you set the file type manually.

Debugging

Enable the debugging with:

let g:validator_debug = 1

The output is logged in plugin installation directory:

e.g. /path/to/validator.vim/pythonx/validator.log

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].