configured for htmlhint

This commit is contained in:
ManjaroOne666 2017-09-17 18:18:23 +01:00
parent 6c5ec1630a
commit 4ab1a70436
1 changed files with 42 additions and 12 deletions

54
vimrc
View File

@ -83,7 +83,19 @@ Plugin 'honza/vim-snippets'
" syntastic
" https://github.com/vim-syntastic/syntastic
Plugin 'vim-syntastic/syntastic'
"Plugin 'vim-syntastic/syntastic'
" ALE
" https://github.com/w0rp/ale
Plugin 'w0rp/ale'
" MatchTag
" https://github.com/gregsexton/MatchTag
Plugin 'gregsexton/MatchTag'
" phpcomplete.vim
" https://github.com/shawncplus/phpcomplete.vim
Plugin 'shawncplus/phpcomplete.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
@ -155,7 +167,8 @@ set statusline+=[\ %{v:register}\ ]\ " active register
set statusline+=[%{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')}]\ \ " session status
set statusline+=%#InterfaceH3#
set statusline+=\ %{SyntasticStatuslineFlag()}
"set statusline+=\ %{SyntasticStatuslineFlag()}
set statusline+=%{LinterStatus()}
set statusline+=%#InterfaceNormal#
set statusline+=\ %l\
@ -257,25 +270,42 @@ set completeopt+=noinsert
set complete-=i
set complete-=t
let g:mucomplete#chains = { 'default' : ['c-p', 'incl', 'tags'] }
let g:mucomplete#popup_direction = { 'path' : -1, 'c-p': -1 }
let g:mucomplete#chains = { 'default' : ['tags', 'c-p', 'incl'] }
let g:mucomplete#popup_direction = { 'path' : 1, 'c-p': 1, 'tags': 1, 'incl': 1 }
set shortmess+=c " Shut off completion messages
set belloff+=ctrlg " If Vim beeps during completion
call add(g:mucomplete#chains['default'], 'ulti')
" ALE
let g:ale_sign_error = '>>'
let g:ale_sign_warning = '--'
let g:ale_linters = {'scss': ['stylelint'], 'javascript': ['jshint'], 'php':['php'], 'html':['htmlhint']}
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
function! LinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? 'OK' : printf('%dW %dE', all_non_errors, all_errors)
endfunction
"nmap <silent> <C-k> <Plug>(ale_previous_wrap)
"nmap <silent> <C-j> <Plug>(ale_next_wrap)
" syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_stl_format = "[%E{%e E: %fe}%B{,} %W{%w W: %fw}]"
"let g:syntastic_always_populate_loc_list = 1
"let g:syntastic_auto_loc_list = 0
"let g:syntastic_check_on_open = 1
"let g:syntastic_check_on_wq = 0
"let g:syntastic_stl_format = "[%E{%e E: %fe}%B{,} %W{%w W: %fw}]"
let g:syntastic_scss_checkers = ['sass_lint']
let g:syntastic_scss_sass_lint_args = "-v -c /home/ray/.config/sass-lint/sass-lint.yml"
"let g:syntastic_scss_checkers = ['sass_lint']
"let g:syntastic_scss_sass_lint_args = "-v -c /home/ray/.config/sass-lint/sass-lint.yml"
" ultisnips
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.