This commit is contained in:
light
2018-10-30 19:00:38 +08:00
parent 1761b1aabf
commit e8e037ae1e
2 changed files with 181 additions and 0 deletions
+33
View File
@@ -4,6 +4,39 @@ call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
"Plugin 'junegunn/fzf.vim'
Plugin 'w0rp/ale'
let g:ale_sign_column_always = 1
let g:ale_set_highlights = 0
"自定义error和warning图标
let g:ale_sign_error = '✗'
let g:ale_sign_warning = '⚡'
"在vim自带的状态栏中整合ale
let g:ale_statusline_format = ['✗ %d', '⚡ %d', '✔ OK']
"显示Linter名称,出错或警告等相关信息
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let s:error_symbol = get(g:, 'airline#extensions#ale#error_symbol', 'E:')
let s:warning_symbol = get(g:, 'airline#extensions#ale#warning_symbol', 'W:')
let g:ale_linters = {
\ 'c++': ['clang'],
\ 'c': ['clang'],
\ 'python': ['flake8'],
\}
"普通模式下,ep前往上一个错误或警告,en前往下一个错误或警告
nmap ep <Plug>(ale_previous_wrap)
nmap en <Plug>(ale_next_wrap)
"<Leader>s触发/关闭语法检查
nmap <Leader>e :ALEToggle<CR>
"<Leader>d查看错误或警告的详细信息
nmap <Leader>ed :ALEDetail<CR>
Plugin 'https://github.com/taketwo/vim-ros.git'
"hightlight