summaryrefslogtreecommitdiffstats
path: root/.config/nvim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim')
-rwxr-xr-x.config/nvim/init.vim35
1 files changed, 9 insertions, 26 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 5d415ce..f3ce6d5 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -12,6 +12,8 @@ Plug 'ludovicchabant/vim-gutentags'
12Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' 12Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
13"autopair plugin 13"autopair plugin
14Plug 'tmsvg/pear-tree' 14Plug 'tmsvg/pear-tree'
15"colored brackets
16Plug 'luochen1990/rainbow'
15 17
16" Plugin outside ~/.vim/plugged with post-update hook 18" Plugin outside ~/.vim/plugged with post-update hook
17Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } 19Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
@@ -88,7 +90,6 @@ call plug#end() " required
88"}}} 90"}}}
89 91
90"{{{Auto Commands 92"{{{Auto Commands
91
92" Automatically cd into the directory that the file is in 93" Automatically cd into the directory that the file is in
93autocmd BufEnter * silent! lcd %:p:h 94autocmd BufEnter * silent! lcd %:p:h
94 95
@@ -97,11 +98,9 @@ autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif
97 98
98" Close vim if the only window left open is NERDTree 99" Close vim if the only window left open is NERDTree
99autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif 100autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
100
101"}}} 101"}}}
102 102
103"{{{Misc Settings 103"{{{Misc Settings
104
105let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py' 104let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
106 105
107" Tab stuff 106" Tab stuff
@@ -120,7 +119,6 @@ set scrolloff=4 " Keep n lines above/below cursor
120set mouse=c 119set mouse=c
121set number " line numbers 120set number " line numbers
122set foldmethod=marker " folding stuffs 121set foldmethod=marker " folding stuffs
123set nohidden " when i close a tab, remove the buffer
124set title " set terminal title 122set title " set terminal title
125set showmatch " jump to the matching bracket briefly, REMOVE AFTER TESTING 123set showmatch " jump to the matching bracket briefly, REMOVE AFTER TESTING
126set linebreak " wrap using 'breakat' character 124set linebreak " wrap using 'breakat' character
@@ -135,11 +133,9 @@ set smartcase
135" https://stackoverflow.com/a/3445040/ 133" https://stackoverflow.com/a/3445040/
136" switch case labels 134" switch case labels
137set cinoptions=l1 135set cinoptions=l1
138
139" }}} 136" }}}
140 137
141"{{{Look and Feel 138"{{{Look and Feel
142
143set termguicolors 139set termguicolors
144"highlight NormalNC guibg='Black' 140"highlight NormalNC guibg='Black'
145 141
@@ -149,7 +145,6 @@ let g:nord_italic_comments = 1
149let g:nord_cursor_line_number_background = 1 145let g:nord_cursor_line_number_background = 1
150 146
151colorscheme nord 147colorscheme nord
152
153" }}} 148" }}}
154 149
155"{{{ Functions 150"{{{ Functions
@@ -186,7 +181,6 @@ endfunction
186"}}} 181"}}}
187 182
188"{{{ Mappings 183"{{{ Mappings
189
190" Open Url on this line with the browser \w 184" Open Url on this line with the browser \w
191map <Leader>w :call Browser ()<CR> 185map <Leader>w :call Browser ()<CR>
192" Open the TagBar Plugin <F3> 186" Open the TagBar Plugin <F3>
@@ -233,39 +227,29 @@ nnoremap <Leader>t "=strftime("%F")<CR>P
233"}}} 227"}}}
234 228
235"{{{Tagbar 229"{{{Tagbar
236
237let g:tagbar_autofocus = 1 230let g:tagbar_autofocus = 1
238let g:tagbar_compact = 1 231let g:tagbar_compact = 1
239let g:tagbar_sort = 0 232let g:tagbar_sort = 0
240let g:tagbar_width = 25 233let g:tagbar_width = 25
241
242"}}} 234"}}}
243 235
244"{{{ Airline 236"{{{ Airline
245 237let g:airline_powerline_fonts = 1
246let g:airline_powerline_fonts = 1 " fira code
247 238
248let g:airline#extensions#tabline#formatter = 'unique_tail' 239let g:airline#extensions#tabline#formatter = 'unique_tail'
249let g:airline#extensions#ycm#enabled = 1 240let g:airline#extensions#ycm#enabled = 1
250
251"}}} 241"}}}
252 242
253"{{{ NERDTree 243"{{{ NERDTree
254
255let g:NERDTreeWinSize=25 244let g:NERDTreeWinSize=25
256
257"}}} 245"}}}
258 246
259"{{{ Ale 247"{{{ Ale
260
261let g:ale_sign_error = '✗' 248let g:ale_sign_error = '✗'
262let g:ale_sign_warning = '⚑' 249let g:ale_sign_warning = '⚑'
263
264"}}} 250"}}}
265 251
266"{{{ YouCompleteMe 252"{{{ YouCompleteMe
267
268"let g:ycm_autoclose_preview_window_after_completion = 1
269let g:ycm_always_populate_location_list = 1 253let g:ycm_always_populate_location_list = 1
270let g:ycm_error_symbol = '✗' 254let g:ycm_error_symbol = '✗'
271let g:ycm_warning_symbol = '⚑' 255let g:ycm_warning_symbol = '⚑'
@@ -294,11 +278,11 @@ let g:ycm_filetype_specific_completion_to_disable = {
294"}}} 278"}}}
295 279
296"{{{ Ledger 280"{{{ Ledger
297
298let g:ledger_extra_options = '--pedantic --explicit --check-payees' 281let g:ledger_extra_options = '--pedantic --explicit --check-payees'
299au FileType ledger noremap { ?^\d<CR> 282au FileType ledger noremap { ?^\d<CR>
300au FileType ledger noremap } /^\d<CR> 283au FileType ledger noremap } /^\d<CR>
301 284let g:ledger_maxwidth = 48
285let g:ledger_fillstring = ' ~'
302"}}} 286"}}}
303 287
304"{{{ UltiSnips/YouCompleteMe 288"{{{ UltiSnips/YouCompleteMe
@@ -318,7 +302,6 @@ let g:UltiSnipsListSnippets = "<C-h>"
318"}}} 302"}}}
319 303
320"{{{ vim-startify 304"{{{ vim-startify
321
322function! StartifyEntryFormat() 305function! StartifyEntryFormat()
323 return 'WebDevIconsGetFileTypeSymbol(absolute_path) ." ". entry_path' 306 return 'WebDevIconsGetFileTypeSymbol(absolute_path) ." ". entry_path'
324endfunction 307endfunction
@@ -331,8 +314,6 @@ else
331 let entry_format .= '. entry_path' 314 let entry_format .= '. entry_path'
332endif 315endif
333 316
334
335
336let g:ascii = [ 317let g:ascii = [
337 \' | ', 318 \' | ',
338 \'\ \ \ / -_) | _| _ \ ` \ -_)', 319 \'\ \ \ / -_) | _| _ \ ` \ -_)',
@@ -351,7 +332,7 @@ let g:vimwiki_list = [{'path': '/home/yigit/Dropbox/personal_wiki',
351 \ 'css_name': 'tufte.css', 332 \ 'css_name': 'tufte.css',
352 \ 'auto_export': 1}] 333 \ 'auto_export': 1}]
353let g:vimwiki_global_ext = 0 334let g:vimwiki_global_ext = 0
354map <Leader>b <Plug>VimwikiToggleListItem 335map <Leader>c <Plug>VimwikiToggleListItem
355"}}} 336"}}}
356 337
357"{{{ yanks/registers and clips 338"{{{ yanks/registers and clips
@@ -388,6 +369,8 @@ nnoremap X D
388 369
389" {{{ vimtex 370" {{{ vimtex
390let g:vimtex_view_method = 'zathura' 371let g:vimtex_view_method = 'zathura'
391let g:vimtex_syntax_enabled = 0 372" }}}
392 373
374" {{{ rainbow
375let g:rainbow_active = 1
393" }}} 376" }}}