42 lines
1,001 B
VimL
42 lines
1,001 B
VimL
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
||
|
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||
|
endif
|
||
|
|
||
|
call plug#begin()
|
||
|
|
||
|
Plug 'tpope/vim-commentary'
|
||
|
Plug 'tpope/vim-surround'
|
||
|
Plug 'jiangmiao/auto-pairs'
|
||
|
|
||
|
Plug 'SirVer/ultisnips'
|
||
|
Plug 'honza/vim-snippets'
|
||
|
|
||
|
" js/ts/...
|
||
|
Plug 'pangloss/vim-javascript'
|
||
|
Plug 'leafgarland/typescript-vim'
|
||
|
Plug 'peitalin/vim-jsx-typescript'
|
||
|
|
||
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||
|
let g:coc_global_extensions = [
|
||
|
\ 'coc-tsserver',
|
||
|
\ 'coc-html',
|
||
|
\ 'coc-json',
|
||
|
\ 'coc-pyright'
|
||
|
\ ]
|
||
|
|
||
|
call plug#end()
|
||
|
|
||
|
" snippets
|
||
|
let g:UltiSnipsExpandTrigger="<tab>"
|
||
|
|
||
|
" coc
|
||
|
" if isdirectory('./node_modules') && isdirectory('./node_modules/prettier')
|
||
|
" let g:coc_global_extensions += ['coc-prettier']
|
||
|
" endif
|
||
|
if isdirectory('./node_modules') && isdirectory('./node_modules/eslint')
|
||
|
let g:coc_global_extensions += ['coc-eslint']
|
||
|
endif
|
||
|
|