base vim config
This commit is contained in:
parent
7171b32d77
commit
3ed89e5b74
2 changed files with 47 additions and 0 deletions
6
.vim/coc-settings.json
Normal file
6
.vim/coc-settings.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"python.pythonPath": "env/bin/python",
|
||||
"prettier.disableSuccessMessage": true,
|
||||
"eslint.autoFixOnSave": true,
|
||||
"eslint.filetypes": ["javascript", "javascriptreact", "typescript", "typescriptreact"]
|
||||
}
|
41
.vimrc
Normal file
41
.vimrc
Normal file
|
@ -0,0 +1,41 @@
|
|||
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
|
||||
|
Loading…
Add table
Reference in a new issue