ale eslint fixer
This commit is contained in:
parent
1f2ed1f12d
commit
7a518f6fb3
79
vimrc
79
vimrc
|
@ -163,12 +163,18 @@ Plug 'studio-vx/vim-qlist'
|
||||||
nnoremap <silent> <space>gc :Gcommit<CR>
|
nnoremap <silent> <space>gc :Gcommit<CR>
|
||||||
nnoremap <silent> <space>gl :Glog<CR>
|
nnoremap <silent> <space>gl :Glog<CR>
|
||||||
nnoremap <silent> <space>gp :Gpush<CR>:copen<CR>
|
nnoremap <silent> <space>gp :Gpush<CR>:copen<CR>
|
||||||
|
nnoremap <silent> <space>gp :Gpushjob<CR>:copen<CR>
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
" #wakatime{{{
|
" #wakatime{{{
|
||||||
" https://wakatime.com/vim
|
" https://wakatime.com/vim
|
||||||
Plug 'wakatime/vim-wakatime'
|
Plug 'wakatime/vim-wakatime'
|
||||||
|
|
||||||
|
"}}}
|
||||||
|
" #wal.vim {{{
|
||||||
|
" https://github.com/dylanaraps/wal.vim
|
||||||
|
Plug 'dylanaraps/wal.vim'
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
if g:vimrc_load_dev_plugins
|
if g:vimrc_load_dev_plugins
|
||||||
|
@ -179,40 +185,46 @@ if g:vimrc_load_dev_plugins
|
||||||
let g:ale_sign_column_always = 1
|
let g:ale_sign_column_always = 1
|
||||||
let g:ale_open_list = 0
|
let g:ale_open_list = 0
|
||||||
|
|
||||||
let g:ale_linters = {'scss': ['stylelint'], 'javascript': [], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': []}
|
" when coc enabled
|
||||||
|
" let g:ale_linters = {'scss': ['stylelint'], 'javascript': [], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': []}
|
||||||
|
" when coc not enabled
|
||||||
|
let g:ale_linters = {'scss': ['stylelint'], 'javascript': ['eslint'], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': ['eslint']}
|
||||||
|
|
||||||
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
|
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
|
||||||
let g:ale_fixers = {'javascript': ['eslint']}
|
let g:ale_fixers = {'javascript': ['eslint'], 'vue': ['eslint']}
|
||||||
let g:ale_sign_error = 'Α'
|
let g:ale_sign_error = 'Α'
|
||||||
let g:ale_sign_warning = 'α'
|
let g:ale_sign_warning = 'α'
|
||||||
|
|
||||||
|
nmap <space>af <Plug>(ale_fix)
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
" #coc.nvim{{{
|
" " #coc.nvim{{{
|
||||||
" https://github.com/neoclide/coc.nvim
|
" " https://github.com/neoclide/coc.nvim
|
||||||
Plug 'neoclide/coc.nvim', {'tag': '*', 'do': { -> coc#util#install()}}
|
" Plug 'neoclide/coc.nvim', {'tag': '*', 'do': { -> coc#util#install()}}
|
||||||
|
"
|
||||||
let g:coc_snippet_next = '<tab>'
|
" let g:coc_snippet_next = '<tab>'
|
||||||
let g:coc_snippet_prev = '<s-tab>'
|
" let g:coc_snippet_prev = '<s-tab>'
|
||||||
|
"
|
||||||
inoremap <silent><expr> <c-n> coc#refresh()
|
" inoremap <silent><expr> <c-n> coc#refresh()
|
||||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
" nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||||
nnoremap <silent> \d <Plug>(coc-definition)
|
" nnoremap <silent> \d <Plug>(coc-definition)
|
||||||
nnoremap <silent> \y <Plug>(coc-type-definition)
|
" nnoremap <silent> \y <Plug>(coc-type-definition)
|
||||||
nnoremap <silent> \i <Plug>(coc-implementation)
|
" nnoremap <silent> \i <Plug>(coc-implementation)
|
||||||
nnoremap <silent> \r <Plug>(coc-references)
|
" nnoremap <silent> \r <Plug>(coc-references)
|
||||||
nnoremap \n <Plug>(coc-rename)
|
" nnoremap \n <Plug>(coc-rename)
|
||||||
vnoremap \f <Plug>(coc-format-selected)
|
" vnoremap \f <Plug>(coc-format-selected)
|
||||||
nnoremap \f <Plug>(coc-format-selected)
|
" nnoremap \f <Plug>(coc-format-selected)
|
||||||
command! -nargs=0 Format :call CocAction('format')
|
" command! -nargs=0 Format :call CocAction('format')
|
||||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
" command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||||
|
"
|
||||||
function! s:show_documentation()
|
" function! s:show_documentation()
|
||||||
if &filetype == 'vim' || &filetype == 'help'
|
" if &filetype == 'vim' || &filetype == 'help'
|
||||||
execute 'h '.expand('<cword>')
|
" execute 'h '.expand('<cword>')
|
||||||
else
|
" else
|
||||||
call CocAction('doHover')
|
" call CocAction('doHover')
|
||||||
endif
|
" endif
|
||||||
endfunction
|
" endfunction
|
||||||
"}}}
|
" " }}}
|
||||||
" #colorV {{{
|
" #colorV {{{
|
||||||
" original:
|
" original:
|
||||||
" https://github.com/gu-fan/colorv.vim
|
" https://github.com/gu-fan/colorv.vim
|
||||||
|
@ -988,7 +1000,14 @@ command! -nargs=1 -complete=command Redir silent call Redir(<q-args>)
|
||||||
" :Redir hi ............. show the full output of command ':hi' in a scratch window
|
" :Redir hi ............. show the full output of command ':hi' in a scratch window
|
||||||
" :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window
|
" :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window
|
||||||
"}}}
|
"}}}
|
||||||
|
function Test() abort "{{{
|
||||||
|
let job = job_start('ls -lah', {'callback': 'Testcallback'})
|
||||||
|
endfunction
|
||||||
|
"}}}
|
||||||
|
function Testcallback(channel, msg) abort
|
||||||
|
echom a:channel . ': ' . a:msg
|
||||||
|
endfunction
|
||||||
|
"}}}
|
||||||
"----------------------------------------------------------------------------}}}
|
"----------------------------------------------------------------------------}}}
|
||||||
"#commands{{{
|
"#commands{{{
|
||||||
" TrimWhitespace{{{
|
" TrimWhitespace{{{
|
||||||
|
|
Loading…
Reference in New Issue