-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
199 lines (169 loc) · 4.53 KB
/
init.vim
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
" __ _ __ _
" \ \ __ _ ___ ___ _ __( )__ /\ \ \/\ /(_)_ __ ___
" \ \/ _` / __|/ _ \| '_ \/ __| / \/ /\ \ / / | '_ ` _ \
" /\_/ / (_| \__ \ (_) | | | \__ \ / /\ / \ V /| | | | | | |
" \___/ \__,_|___/\___/|_| |_|___/ \_\ \/ \_/ |_|_| |_| |_|
" System
set noswapfile
let g:python2_host_prog = '/usr/local/bin/python2'
let g:python3_host_prog = '/usr/local/bin/python3'
set runtimepath+='~/.config/nvim/plugged/deoplete.nvim/'
" Vim Plug
call plug#begin('~/.config/nvim/plugged')
Plug 'morhetz/gruvbox'
Plug 'kristijanhusak/vim-hybrid-material'
Plug 'icymind/neosolarized'
Plug 'colepeters/spacemacs-theme.vim'
Plug 'joshdick/onedark.vim'
Plug 'arcticicestudio/nord-vim'
Plug 'tpope/vim-fugitive'
Plug 'scrooloose/nerdtree'
Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'elixir-lang/vim-elixir'
Plug 'slashmili/alchemist.vim'
Plug 'fatih/vim-go'
Plug 'junegunn/fzf'
Plug 'vim-scripts/mru.vim'
Plug 'ap/vim-buftabline'
Plug 'w0rp/ale'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'tpope/vim-surround'
Plug 'elmcast/elm-vim'
Plug 'carlosgaldino/elixir-snippets'
Plug 'honza/vim-snippets'
Plug 'mhinz/vim-signify'
Plug 'junegunn/goyo.vim'
Plug 'eagletmt/ghcmod-vim'
Plug 'pangloss/vim-javascript'
Plug 'darthmall/vim-vue'
Plug 'jiangmiao/auto-pairs'
Plug 'leafgarland/typescript-vim'
Plug 'mattesgroeger/vim-bookmarks'
Plug 'ntpeters/vim-better-whitespace'
Plug 'ryanoasis/vim-devicons'
Plug 'dag/vim2hs'
Plug 'majutsushi/tagbar'
Plug 'jstemmer/gotags'
" Init Plugin Systems
call plug#end()
" deoplete
" Use deoplete.
call deoplete#enable()
""""""""""""""""""""""""""""""""
"""""""" Shortcuts """""""""""""
""""""""""""""""""""""""""""""""
" Insert at EOL or BOL from insert mode
" Useful for dealing with autopairs and the like.
cnoreabbrev W! w!
cnoreabbrev Q! q!
cnoreabbrev Qall! qall!
cnoreabbrev Wq wq
cnoreabbrev Wa wa
cnoreabbrev wQ wq
cnoreabbrev WQ wq
cnoreabbrev W w
cnoreabbrev Q q
cnoreabbrev Qall qall
"""""""""""""""""""""""""""""""
"""""""" Interface """"""""""""
"""""""""""""""""""""""""""""""
filetype on
set relativenumber number
set cursorline
set mouse=a
"""""""""""""""""""""""""""""""
"""""""" editor """"""""""""
"""""""""""""""""""""""""""""""
set expandtab
set shiftwidth=2
set softtabstop=2
set encoding=utf8
au TermOpen * setlocal nonumber norelativenumber
set nofoldenable " disable folding
set tabstop=2
"""""""""""""""""""""""""""""""
""""""" Plugin Configs """"""""
"""""""""""""""""""""""""""""""
" tagbar
autocmd FileType go call SetGoOptions()
function! SetGoOptions()
setlocal shiftwidth=4 tabstop=4 softtabstop=4 expandtab makeprg=php-xdebug\ %
:call tagbar#autoopen(0)
endfunction
" vimgo
let g:go_auto_type_info = 1
" tagbar go
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
" ale
" Error and warning signs.
let g:ale_sign_error = '⤫'
let g:ale_sign_warning = '⚠'
" Enable integration with airline.
let g:airline#extensions#ale#enabled = 1
"NERD_FONT
set encoding=utf8
set guifont=KnackRegular_Nerd_Font:h12
" ale
" Enable completion where available.
let g:ale_completion_enabled = 1
" Enable integration with airline.
let g:airline#extensions#ale#enabled = 1
""" nerdtree
" Open NERDTree if no file or dir specified
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" buftabline
set hidden
nnoremap <C-N> :bnext<CR>
nnoremap <C-P> :bprev<CR>
let NERDTreeQuitOnOpen=0
" vim-airline
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
"" Automatically displays all buffers when there's only one tab open.
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts=1
let g:airline_theme='gruvbox'
" colorscheme
"
" let g:neosolarized_bold = 1
" let g:neosolarized_italic = 1
let g:enable_bold_font = 0
let g:enable_italic_font = 1
set termguicolors
"let g:solarized_termcolors=256
set background=dark
colorscheme gruvbox
""""""""""""""""""""""""""""""""
"""""""" Lang Support """"""""""
""""""""""""""""""""""""""""""""
"" Elm
" Automatic code formatting
let g:elm_format_autosave = 1