-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
184 lines (143 loc) · 6.51 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
" ██████╗ ██████╗ ██████╗ ██╗ █████╗
" ██╔══██╗██╔═══██╗██╔══██╗ ██║██╔══██╗
" ██████╔╝██║ ██║██████╔╝ ██║███████║
" ██╔══██╗██║ ██║██╔══██╗██ ██║██╔══██║
" ██████╔╝╚██████╔╝██║ ██║╚█████╔╝██║ ██║
" ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚════╝ ╚═╝ ╚═╝
" ███╗ ██╗██╗ ██╗██╗███╗ ███╗
" ████╗ ██║██║ ██║██║████╗ ████║
" ██╔██╗ ██║██║ ██║██║██╔████╔██║
" ██║╚██╗██║╚██╗ ██╔╝██║██║╚██╔╝██║
" ██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║
" ╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
source ~/.config/nvim/plugins.vim
source ~/.config/nvim/shortcuts.vim
" ------------------------------ System Settings -------------------------------
" Use Vim defaults
set nocompatible
" Encoding displayed and written to file in utf-8
scriptencoding utf-8
set encoding=utf-8
set fileencoding=utf-8
" Neovim color support for true
" let $NVIM_TUI_ENABLE_TRUE_COLOR=1
" Color Neovim
set t_Co=256
colorscheme dracula
" The current buffer can be put to the background without writing to disk
set hidden
" ------------------------------ Code formatting ------------------------------
" Enable syntax highlighting
syntax on
" Show line numbers
set number relativenumber
" Show matching brackets.
set showmatch
" Bracket blinking.
set matchtime=2
" Remember indentation of previous line
set autoindent
" Tabs are 2 spaces
set tabstop=2
" Replace tabs with ${tabstop} spaces
set expandtab
" A tab as the first character on a line is shiftwidth
set smarttab
" Default shift width for indents
set shiftwidth=2
"Change indentline
let g:indentLine_char = '┆'
" ------------------------------ Autocommands and Fyletype --------------------
" Filetypes
filetype on
filetype plugin on
filetype indent on
" This will start Startify
autocmd VimEnter * if !argc() | Startify | wincmd w | endif
" Remember cursor position between vim sessions
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
" Center buffer around cursor when opening files
autocmd BufRead * normal zz
" BASH / ZSH support
autocmd FileType sh setlocal shiftwidth=4 tabstop=4 softtabstop=4
autocmd FileType sh set keywordprg=man
" Java/HTML/JS support
autocmd FileType java,html,javascript setlocal shiftwidth=2 tabstop=2 softtabstop=2
" JSON support
au! BufRead,BufNewFile *.json set filetype=json
" ------------------------------ YouCompleteMe ------------------------------
" Start autocompletion after 4 chars
" let g:ycm_min_num_of_chars_for_completion = 4
" let g:ycm_min_num_identifier_candidate_chars = 4
" let g:ycm_enable_diagnostic_highlighting = 0
" Enhance YCM JS completion with tern's smarts
autocmd FileType javascript setlocal omnifunc=tern#Complete
" Don't show YCM's preview window
set completeopt-=preview
let g:ycm_add_preview_to_completeopt = 0
" Add typescript at YCM
if !exists("g:ycm_semantic_triggers")
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers['typescript'] = ['.']
" ------------------------------ Snippets ---------------------------------
" Add support snippets for JS
autocmd FileType js UltiSnipsAddFiletypes javascript-jasmine
let g:UltiSnipsExpandTrigger="j<tab>"
" Show correct syntax on JSON
let g:vim_json_syntax_conceal = 0
" ------------------------------ NERDCommenter -------------------------------
" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1
" Use compact syntax for prettified multi-line comments
let g:NERDCompactSexyComs = 1
" ------------------------------ Emmet ----------------------------------
let g:user_emmet_install_global = 0
autocmd FileType html,css,scss EmmetInstall
let g:user_emmet_leader_key=','
" ------------------------------ NERDTree ----------------------------------
let g:NERDTreeWinPos = "right"
let g:NERDTreeWinSize=30
let g:NERDTreeMinimalUI=1
" ------------------------------ DevIcons -----------------------------------
let g:webdevicons_enable_vimfiler = 1
let g:webdevicons_enable_nerdtree = 1
let g:webdevicons_enable = 1
let g:NERDTreeGitStatusNodeColorization = 1
let g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol = ''
let g:WebDevIconsOS = 'Darwin'
let g:WebDevIconsUnicodeDecorateFolderNodes = 1
let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = ''
let g:WebDevIconsUnicodeDecorateFolderNodes = 1
let g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {}
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['js'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['tsx'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['css'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['html'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['json'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['md'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['sql'] = ''
" ------------------------------ Airline Settings ------------------------------
let g:airline_section_x=""
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.branch = ''
let g:airline_powerline_fonts = 1
let g:airline_section_b = ' '
let gebdevicons_enable_airline_statusline = 0
let g:airline#extensions#hunks#enabled = 0
let g:airline#extensions#whitespace#enabled = 0
let g:airline#extensions#wordcount#enabled = 0
let g:airline#extensions#mike#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline#extensions#tabline#buffer_idx_mode = 1
let g:airline#extensions#branch#format = 0
let g:airline_detect_spelllang=0
let g:airline_detect_spell=0
let g:airline_section_y = ''
let g:line_no_indicator_chars = ['⎺', '⎻', '⎼', '⎽', '_']