Browse Source

Switch to ALE in neovim

coc
Schneider 7 years ago
parent
commit
7277115fb2
  1. 6
      vim/ftplugin/go.vim
  2. 25
      vim/ftplugin/javascript.vim
  3. 2
      vim/ftplugin/php.vim
  4. 3
      vim/ftplugin/python.vim
  5. 41
      vimrc.symlink

6
vim/ftplugin/go.vim

@ -1,4 +1,8 @@
let g:syntastic_go_checkers = ['go', 'golint', 'govet']
if has("nvim")
else
let g:syntastic_go_checkers = ['go', 'golint', 'govet']
endif
let g:go_fmt_command = "goimports"
au FileType go nmap <F5> <Plug>(go-run)

25
vim/ftplugin/javascript.vim

@ -1,12 +1,19 @@
"let g:syntastic_javascript_checkers = ['standard']
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_javascript_eslint_exe = '$(npm bin)/eslint'
let g:syntastic_javascript_eslint_args = ['--fix']
" And also for vue
let g:syntastic_vue_checkers = ['eslint']
let g:syntastic_vue_eslint_exe = '$(npm bin)/eslint'
let g:syntastic_vue_eslint_args = ['--fix']
if has("nvim")
else
" Syntastic {{{
"let g:syntastic_javascript_checkers = ['standard']
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_javascript_eslint_exe = '$(npm bin)/eslint'
let g:syntastic_javascript_eslint_args = ['--fix']
" And also for vue
let g:syntastic_vue_checkers = ['eslint']
let g:syntastic_vue_eslint_exe = '$(npm bin)/eslint'
let g:syntastic_vue_eslint_args = ['--fix']
"}}}
endif
"autocmd bufwritepost *.js silent !standard --fix %
set wildignore+=node_modules

2
vim/ftplugin/php.vim

@ -5,4 +5,4 @@ let g:gutentags_ctags_exclude = ['*.css', '*.html', '*.js', '*.json', '*.xml',
\ '*vendor/*/fixture*', '*vendor/*/Fixture*',
\ '*var/cache*', '*var/log*']
let g:gutentags_ctags_executable = '/home/schneider/bin/phpctags'
let g:gutentags_project_root = '.phpcd.vim'
let g:gutentags_project_root = [ '.phpcd.vim', '.git' ]

3
vim/ftplugin/python.vim

@ -1,4 +1,7 @@
" use python3 as linter
if getline(1) =~# '^#!.*python3\>'
if has("nvim")
else
let syntastic_python_python_exec="python3"
endif
endif

41
vimrc.symlink

@ -3,8 +3,14 @@ filetype off " required
" Section Plugins {{{
" Load vim-plug
if empty(glob("~/.vim/autoload/plug.vim"))
execute '!curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim'
if has("nvim")
if empty(glob("~/.config/nvim/autoload/plug.vim"))
execute '!curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
endif
else
if empty(glob("~/.vim/autoload/plug.vim"))
execute '!curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.github.com/junegunn/vim-plug/master/plug.vim'
endif
endif
call plug#begin()
" alternatively, pass a path where Vundle should install plugins
@ -30,7 +36,11 @@ Plug 'bling/vim-airline'
Plug 'tpope/vim-ragtag'
Plug 'tpope/vim-surround' " better handling of surrounding markers
Plug 'tpope/vim-repeat' " repeat last command with .
Plug 'vim-syntastic/syntastic' " automatic linters
if has("nvim")
Plug 'w0rp/ale' " asynchronous linting engine
else
Plug 'vim-syntastic/syntastic' " automatic linters
endif
Plug 'altercation/vim-colors-solarized' " solarized theme
Plug 'godlygeek/tabular' " Align text on symbols
Plug 'ludovicchabant/vim-gutentags', { 'for': ['php', 'c', 'cpp'] }
@ -182,15 +192,22 @@ let NERDTreeShowHidden=1
let g:airline_powerline_fonts = 1
" Syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_aggregate_errors = 1
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" Syntastic{{{
if !has("nvim")
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_aggregate_errors = 1
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
endif
"}}}
" ALE {{{
let g:airline#extensions#ale#enabled = 1
"}}}
let vim_tags_ctags_binary='~/bin/phpctags'"

Loading…
Cancel
Save