Browse Source

Tidy up js settings

coc
Schneider 5 years ago
parent
commit
f87daf3cb3
Signed by: schneider GPG Key ID: 3F50B02A50039F3B
  1. 29
      vim/ftplugin/javascript.vim

29
vim/ftplugin/javascript.vim

@ -1,4 +1,3 @@
if has("nvim")
" use prettier in ALE
let g:ale_fixers = {}
let g:ale_fixers['javascript'] = ['prettier']
@ -8,33 +7,11 @@ if has("nvim")
let g:ale_fix_on_save = 1
let g:ale_javascript_prettier_use_local_config = 1
" deoplete-tern {{{
let g:deoplete#sources#ternjs#docs = 1
let g:deoplete#sources#ternjs#case_insensitive = 1
"Add extra filetypes for deoplete tern
let g:deoplete#sources#ternjs#filetypes = [
\ 'jsx',
\ 'javascript.jsx',
\ 'vue',
\ ]
" }}}
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
set tabstop=2
set shiftwidth=2
" Create jsdoc with ,h
nnoremap <leader>h :JsDoc<CR>
Loading…
Cancel
Save