-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
104 lines (80 loc) · 2.12 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
" remove vi compatibility
set nocompatible
" for plugins to load correctly
filetype off
filetype plugin indent on
" line numbers
set number relativenumber
" show cursor position
set ruler
" show partial command as it's being typed
set showcmd
" no beeping or flashing
set belloff=all
" encoding
set encoding=utf-8
" mouse scroll
set mouse=a
" backspace behaviour
set backspace=indent,eol,start
" tab size
set smarttab
set cindent
set tabstop=2
set shiftwidth=2
set expandtab
" load plugins with vim-plug
call plug#begin('~/.vim/plugged')
Plug 'preservim/nerdcommenter'
Plug 'preservim/nerdtree'
Plug 'xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'vim-airline/vim-airline'
Plug 'herringtondarkholme/yats.vim'
Plug 'cespare/vim-toml'
Plug 'maxmellon/vim-jsx-pretty'
Plug 'fatih/vim-go', {'do': ':GoInstallBinaries'}
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'arcticicestudio/nord-vim'
call plug#end()
" coc.nvim recommended configuration
source ~/.vim/coc.vim
" coc extensions
let g:coc_global_extensions=[
\ 'coc-json',
\ 'coc-tsserver',
\ 'coc-tslint-plugin',
\ 'coc-yaml',
\ 'coc-python',
\ 'coc-pairs',
\ 'coc-eslint',
\ 'coc-prettier',
\ 'coc-texlab',
\ ]
highlight CocFloating ctermbg=Gray
colorscheme nord
" prettier command for coc
command! -nargs=0 Prettier :CocCommand prettier.formatFile
" let coc.nvim handle go to definition
let g:go_def_mapping_enabled=0
let g:go_fmt_command='goimports'
" nerdtree
let g:NERDTreeIgnore=['^node_modules$']
nmap <C-n> :NERDTreeToggle<CR>
" nerdcommenter
let g:NERDSpaceDelims=1
nmap <C-_> <plug>NERDCommenterToggle
vmap <C-_> <plug>NERDCommenterToggle
" ctrlp ignores gitignored files
let g:ctrlp_user_command=['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
" airline
let g:airline_powerline_fonts=0
let g:airline#extensions#coc#enabled=0
" auto resize buffers if window resizes
autocmd VimResized * wincmd =
" don't assume comment after new line
autocmd BufRead,BufNewFile * setlocal formatoptions-=ro