3 homepage: https://github.com/dense-analysis/ale
5 ALE: allows you to lint while you type.
8 To update (replacing the current version) run `webi vim-ale`.
12 > ALE (Asynchronous Lint Engine) is a plugin providing linting (syntax checking
13 > and semantic errors) in NeoVim 0.2.0+ and Vim 8 while you edit your text
14 > files, and acts as a Vim Language Server Protocol client.
16 ALE is the spiritual successor to Syntastic.
18 This installer includes a few reasonable defaults.
20 ### How to install and configure manually
23 git clone --depth=1 https://github.com/dense-analysis/ale.git ~/.vim/pack/plugins/start/ale
29 " ALE: reasonable defaults from webinstall.dev/vim-ale
30 source ~/.vim/plugins/ale.vim
33 `.vim/plugins/ale.vim`:
36 " turn on the syntax checker
39 " don't check syntax immediately on open or on quit
40 let g:ale_lint_on_enter = 0
41 let g:ale_lint_on_save = 1
43 " error symbol to use in sidebar
44 let g:ale_sign_error = '☢️'
45 let g:ale_sign_warning = '⚡'
47 " show number of errors
48 function! LinterStatus() abort
49 let l:counts = ale#statusline#Count(bufnr(''))
50 let l:all_errors = l:counts.error + l:counts.style_error
51 let l:all_non_errors = l:counts.total - l:all_errors
52 return l:counts.total == 0 ? 'OK' : printf(
59 set statusline+=\ %{LinterStatus()}
61 " format error strings
62 let g:ale_echo_msg_error_str = 'E'
63 let g:ale_echo_msg_warning_str = 'W'
64 let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'