Browse Source

Add ncm2 back.

jackyalcine 5 months ago
parent
commit
aa02f57a9b
Signed by: Jacky Alciné <yo@jacky.wtf> GPG Key ID: 537A4F904B15268D
1 changed files with 44 additions and 11 deletions
  1. 44
    11
      home/.config/nvim/init.vim

+ 44
- 11
home/.config/nvim/init.vim View File

@@ -29,7 +29,8 @@ set laststatus=2
29 29
 "
30 30
 " Allow myself to count what line I'm on; optimized for scanning and jumping
31 31
 " over multiple lines quickly.
32
-set number numberwidth=6 relativenumber
32
+set number numberwidth=3
33
+set relativenumber
33 34
 set sidescrolloff=1 sidescroll=1
34 35
 set conceallevel=3 concealcursor=nivc
35 36
 
@@ -48,7 +49,6 @@ set noshowmode noshowmatch
48 49
 set lazyredraw
49 50
 set spelllang=en_us
50 51
 set inccommand=nosplit
51
-set redrawtime=10
52 52
 set maxmempattern=8196
53 53
 
54 54
 set completeopt=menu,menuone,preview,noselect,noinsert
@@ -161,7 +161,6 @@ Plug 'tpope/vim-dotenv'
161 161
       \ | Plug 'direnv/direnv.vim'
162 162
       \ | Plug 'wincent/terminus'
163 163
 Plug 'w0rp/ale'
164
-Plug 'Shougo/vimproc.vim', {'do' : 'make'}
165 164
 Plug 'tpope/vim-commentary'
166 165
       \ | Plug 'cbaumhardt/vim-commentary-boxed'
167 166
 Plug 'tpope/vim-fugitive'
@@ -198,6 +197,18 @@ Plug 'mattesgroeger/vim-bookmarks'
198 197
 Plug 'sodapopcan/vim-twiggy'
199 198
 Plug 'junegunn/gv.vim'
200 199
 Plug 'vrybas/vim-flayouts'
200
+Plug 'ekalinin/dockerfile.vim'
201
+
202
+Plug 'ncm2/ncm2'
203
+      \ | Plug 'ncm2/ncm2-bufword'
204
+      \ | Plug 'ncm2/ncm2-path'
205
+      \ | Plug 'ncm2/ncm2-tmux'
206
+      \ | Plug 'ncm2/ncm2-cssomni'
207
+      \ | Plug 'ncm2/ncm2-racer'
208
+      \ | Plug 'ncm2/ncm2-vim' | Plug 'Shougo/neco-vim'
209
+      \ | Plug 'pbogut/ncm2-alchemist' | Plug 'slashmili/alchemist.vim'
210
+      \ | Plug 'ncm2/ncm2-ultisnips'
211
+      \ | Plug 'roxma/nvim-yarp'
201 212
 
202 213
 call plug#end()
203 214
 " }}}
@@ -226,7 +237,7 @@ endif
226 237
 " {{{2 ale
227 238
 let g:ale_command_wrapper = 'nice -n4'
228 239
 let g:ale_set_ballons = 1
229
-let g:ale_completion_enabled = 1
240
+let g:ale_completion_enabled = 0
230 241
 let g:ale_fix_on_save = 1
231 242
 let g:ale_completion_delay = 1
232 243
 let g:ale_completion_max_suggestions = 10
@@ -238,6 +249,10 @@ let g:ale_fixers = {
238 249
       \ 'scss': ['stylelint'],
239 250
       \ 'html': ['stylelint', 'tidy'],
240 251
       \ 'rust': ['rustfmt'],
252
+      \ 'elixir': ['mix_format'],
253
+      \ }
254
+let g:ale_linters  = {
255
+      \ 'elixir': 'all'
241 256
       \ }
242 257
 " 2}}}
243 258
 "
@@ -313,6 +328,11 @@ let g:startify_session_before_save = [
313 328
       \ ]
314 329
 " 2}}}
315 330
 "
331
+let g:UltiSnipsExpandTrigger = "<Plug>(ultisnips_expand)"
332
+let g:UltiSnipsJumpForwardTrigger = "<c-j>"
333
+let g:UltiSnipsJumpBackwardTrigger  = "<c-k>"
334
+let g:UltiSnipsRemoveSelectModeMappings = 0
335
+"
316 336
 " {{{2
317 337
 let g:test#strategy = 'neovim'
318 338
 let g:test#neovim#term_position = "topleft"
@@ -331,14 +351,12 @@ let g:airline_skip_empty_sections = 1
331 351
 let g:airline_extensions = ['branch', 'tabline', 'ale', 'branch', 'hunks', 'cursormode']
332 352
 let g:airline_highlighting_cache = 1
333 353
 let g:airline#extensions#ale#enabled = 1
334
-let g:airline#extensions#branch#displyed_head_limit = 30
354
+let g:airline#extensions#branch#displyed_head_limit = 100
335 355
 let g:airline#extensions#branch#format = 2
336
-let g:airline#extensions#disable_rtp_load = 0
356
+let g:airline#extensions#disable_rtp_load = 1
337 357
 let g:airline#extensions#gutentags#enabled = 1
338 358
 let g:airline#extensions#quickfix#location_text = 'L'
339
-let g:airline#extensions#quickfix#location_text = 'loc'
340 359
 let g:airline#extensions#quickfix#quickfix_text = 'Q'
341
-let g:airline#extensions#quickfix#quickfix_text = 'qfx'
342 360
 let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
343 361
 
344 362
 if !exists('g:airline_symbols')
@@ -378,8 +396,6 @@ let s:mappings = {
378 396
 exec 'let g:mapleader="' . s:mappings.leader . '"'
379 397
 exec 'let g:maplocalleader="' . s:mappings.localLeader. '"'
380 398
 
381
-nnoremap <silent> <CR><CR> :source $MYVIMRC<CR>
382
-
383 399
 call <SID>apply_bulk_mappings([
384 400
       \ ['m', ':Make<space>'],
385 401
       \ ['a', ':Make all<CR>'],
@@ -418,6 +434,7 @@ call <SID>apply_bulk_mappings([
418 434
 call <SID>apply_bulk_mappings([
419 435
       \ ['C', ':Gcommit --branch --verbose %<CR>'],
420 436
       \ ['P', ':Gpush<CR>'],
437
+      \ ['S', ':Glc<CR>'],
421 438
       \ ['b', ':Gbrowse<CR>'],
422 439
       \ ['c', ':Gcommit<CR>'],
423 440
       \ ['cO', ':Git checkout HEAD -- %<CR>'],
@@ -426,16 +443,19 @@ call <SID>apply_bulk_mappings([
426 443
       \ ['f', ':Git fetch<space>'],
427 444
       \ ['fa', ':Git fetch --all<CR>'],
428 445
       \ ['l', ':Gpull<CR>'],
446
+      \ ['mr', ':GlpullRequestSummaryTab'],
429 447
       \ ['p', ':Gpush<space>'],
448
+      \ ['rc', ':GlresolveConflictTab'],
430 449
       \ ['rm', ':Gremove %<CR>'],
431 450
       \ ['rmc', ':Gremove --cached %<CR>'],
432
-      \ ['S', ':Gstatus<CR>'],
433 451
       \ ['sd', ':SignifyDebug<CR>'],
434 452
       \ ['sh', ':SignifyToggleHighlight<CR>'],
435 453
       \ ['sj', '<plug>(signify-next-hunk)'],
436 454
       \ ['sk', '<plug>(signify-prev-hunk)'],
437 455
       \ ['sr', ':SignifyRefresh<CR>'],
438 456
       \ ['st', ':SignifyToggle<CR>'],
457
+      \ ['t', ':Twiggy<CR>'],
458
+      \ ['x', ':Glabort<CR>'],
439 459
       \ ], { 'prefix': 'g' })
440 460
 
441 461
 call <SID>apply_bulk_mappings([
@@ -469,6 +489,7 @@ call <SID>apply_bulk_mappings([
469 489
       \ ], { 'prefix': 'l' })
470 490
 
471 491
 inoremap <c-c> <ESC>
492
+" inoremap <silent> <expr> <CR> ncm2_ultisnips#expand_or("\<CR>", 'n')
472 493
 
473 494
 tnoremap <Esc> <C-\><C-n>
474 495
 tnoremap <A-h> <C-\><C-n><C-w>h
@@ -502,6 +523,18 @@ syntax on
502 523
 autocmd FileType gitcommit set bufhidden=delete
503 524
 autocmd FileType fugitive setl winheight=40
504 525
 autocmd TermOpen * setl nonumber signcolumn=no foldcolumn=0
526
+autocmd BufEnter * call ncm2#enable_for_buffer()
527
+autocmd User Ncm2PopupOpen set completeopt=noinsert,menuone,noselect
528
+autocmd User Ncm2PopupClose set completeopt=menuone
529
+
530
+function! Multiple_cursors_before()
531
+  call ncm2#lock('vim-multiple-cursors')
532
+endfunction
533
+
534
+function! Multiple_cursors_after()
535
+  call ncm2#unlock('vim-multiple-cursors')
536
+endfunction
537
+
505 538
 
506 539
 command! DisconnectClients
507 540
       \  if exists('b:nvr')

Loading…
Cancel
Save