From 4ab1a704366db4c47bb920e9bd08f8b4da621153 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Sun, 17 Sep 2017 18:18:23 +0100 Subject: [PATCH] configured for htmlhint --- vimrc | 54 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/vimrc b/vimrc index 696b5ff..2cc9dbc 100644 --- a/vimrc +++ b/vimrc @@ -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 (ale_previous_wrap) +"nmap (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 if you use https://github.com/Valloric/YouCompleteMe.