You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.2 KiB
34 lines
1.2 KiB
let b:ale_fixers = {}
|
|
let b:ale_fixers['javascript'] = ['eslint']
|
|
let b:ale_fixers['typescript'] = ['eslint']
|
|
let b:ale_fixers['json'] = ['eslint']
|
|
let b:ale_javascript_prettier_options = '--no-semi --single-quote --tab-width 2'
|
|
let b:ale_typescript_prettier_options = '--no-semi --single-quote --tab-width 2'
|
|
let b:ale_fixers['vue'] = ['prettier']
|
|
let b:ale_vue_prettier_options = '--no-semi --single-quote'
|
|
let b:ale_fix_on_save = 1
|
|
let b:ale_javascript_prettier_use_local_config = 1
|
|
let b:ale_typescript_prettier_use_local_config = 1
|
|
" config for local eslint
|
|
g:ale_javascript_eslint_use_global = 1
|
|
g:ale_javascript_eslint_executable = 'yarn'
|
|
g:ale_javascript_eslint_options = 'run eslint'
|
|
g:ale_typescript_eslint_use_global = 1
|
|
g:ale_typescript_eslint_executable = 'yarn'
|
|
g:ale_typescript_eslint_options = 'run eslint'
|
|
g:ale_json_eslint_use_global = 1
|
|
g:ale_json_eslint_executable = 'yarn'
|
|
g:ale_json_eslint_options = 'run eslint'
|
|
|
|
let g:jsdoc_formatter = 'tsdoc'
|
|
|
|
"autocmd bufwritepost *.js silent !standard --fix %
|
|
setlocal wildignore+=node_modules
|
|
|
|
setlocal tabstop=2
|
|
setlocal shiftwidth=2
|
|
|
|
" Create jsdoc with ,h
|
|
nnoremap <leader>h :JsDoc<CR>
|
|
nnoremap <F8> Biawait <ESC>A
|
|
nnoremap <F2> :Prettier<CR>
|