2020-11-17 16:06:18 +08:00
|
|
|
function! paiyou#before() abort
|
|
|
|
" typescript
|
|
|
|
let g:neoformat_typescriptreact_prettier = {
|
|
|
|
\ 'exe': 'prettier',
|
|
|
|
\ 'args': ['--stdin', '--stdin-filepath', '"%:p"', '--parser', 'typescript'],
|
|
|
|
\ 'stdin': 1
|
|
|
|
\ }
|
2022-11-22 16:53:26 +08:00
|
|
|
let g:neoformat_enabled_typescriptreact = ['prettier']
|
2022-03-07 13:55:23 +08:00
|
|
|
let g:neoformat_enabled_ruby = ['rubocop']
|
2020-11-17 16:06:18 +08:00
|
|
|
endfunction
|
|
|
|
|
2020-02-10 10:56:29 +08:00
|
|
|
function! paiyou#after() abort
|
|
|
|
let g:ale_fixers = {
|
|
|
|
\ 'javascript': ['eslint'],
|
|
|
|
\ 'ruby': ['rubocop'],
|
|
|
|
\}
|
|
|
|
let g:ale_fix_on_save = 1
|
2020-03-02 13:28:52 +08:00
|
|
|
let g:ctrlp_max_files=0
|
2020-02-10 10:56:29 +08:00
|
|
|
endfunction
|
|
|
|
|
2020-09-19 20:19:29 +08:00
|
|
|
" load customized settings
|
2020-02-10 10:56:29 +08:00
|
|
|
|
2020-09-19 20:19:29 +08:00
|
|
|
let vimsettings = '~/.yadr/SpaceVim.d/autoload/settings'
|
|
|
|
let uname = system("uname -s")
|
2020-02-10 10:56:29 +08:00
|
|
|
|
2020-09-19 21:40:14 +08:00
|
|
|
for fpath in split(globpath(vimsettings, '*.vim'), '\n')
|
2020-09-19 20:19:29 +08:00
|
|
|
if (fpath == expand(vimsettings) . "/yadr-keymap-mac.vim") && uname[:4] ==? "linux"
|
|
|
|
continue " skip mac mappings for linux
|
2020-02-10 10:56:29 +08:00
|
|
|
endif
|
|
|
|
|
2020-09-19 20:19:29 +08:00
|
|
|
if (fpath == expand(vimsettings) . "/yadr-keymap-linux.vim") && uname[:4] !=? "linux"
|
|
|
|
continue " skip linux mappings for mac
|
2020-02-10 10:56:29 +08:00
|
|
|
endif
|
|
|
|
|
2020-09-19 20:19:29 +08:00
|
|
|
exe 'source' fpath
|
|
|
|
endfor
|
2022-03-13 00:03:03 +08:00
|
|
|
let g:smoothie_enabled = 0
|
|
|
|
let ruby_no_expensive=1
|