dotar/SpaceVim.d/autoload/paiyou.vim

39 lines
1.1 KiB
VimL
Raw Normal View History

function! paiyou#before() abort
" typescript
let g:neoformat_typescriptreact_prettier = {
\ 'exe': 'prettier',
\ 'args': ['--stdin', '--stdin-filepath', '"%:p"', '--parser', 'typescript'],
\ 'stdin': 1
\ }
let g:neoformat_enabled_typescriptreact = ['prettier']
let g:neoformat_enabled_ruby = ['rubocop']
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
let g:smoothie_enabled = 0
let ruby_no_expensive=1