Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim: Use ALE for linting #79

Merged
merged 1 commit into from
Oct 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Plug 'christoomey/vim-sort-motion'
Plug 'flazz/vim-colorschemes'
Plug 'sjl/gundo.vim'
Plug 'xolox/vim-misc' | Plug 'xolox/vim-easytags'
Plug 'w0rp/ale'

" Text objects
" required for all the vim-textobj-* plugins
Expand Down Expand Up @@ -360,6 +361,25 @@ set grepformat=%f:%l:%c:%m
" PLUGIN OPTIONS {{{
" ===========================================================================

" Ale
" --------

augroup Ale
autocmd!
" ALE linting events
if exists('*ale#Lint')
set updatetime=1000
let g:ale_lint_on_text_changed = 0
autocmd CursorHold * call ale#Lint()
autocmd CursorHoldI * call ale#Lint()
autocmd InsertEnter * call ale#Lint()
autocmd InsertLeave * call ale#Lint()
endif
augroup END
" Move between linting errors
nnoremap ]r :ALENextWrap<CR>
nnoremap [r :ALEPreviousWrap<CR>

" FZF
" -----------------
nnoremap <Leader>t :FZF<CR>
Expand Down