jackyalcine 11 months ago
parent
commit
804a19ae24
Signed by: Jacky Alciné <yo@jacky.wtf> GPG Key ID: 537A4F904B15268D
3 changed files with 43 additions and 21 deletions
  1. 3
    1
      home/.config/nvim/autoload/plug.vim
  2. 38
    18
      home/.config/nvim/init.vim
  3. 2
    2
      home/.vimrc_background

+ 3
- 1
home/.config/nvim/autoload/plug.vim View File

@@ -1011,6 +1011,8 @@ function! s:update_impl(pull, force, args) abort
1011 1011
     let s:clone_opt .= ' -c core.eol=lf -c core.autocrlf=input'
1012 1012
   endif
1013 1013
 
1014
+  let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : ''
1015
+
1014 1016
   " Python version requirement (>= 2.7)
1015 1017
   if python && !has('python3') && !ruby && !use_job && s:update.threads > 1
1016 1018
     redir => pyv
@@ -1102,7 +1104,7 @@ function! s:update_finish()
1102 1104
       if !v:shell_error && filereadable(spec.dir.'/.gitmodules') &&
1103 1105
             \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir))
1104 1106
         call s:log4(name, 'Updating submodules. This may take a while.')
1105
-        let out .= s:bang('git submodule update --init --recursive 2>&1', spec.dir)
1107
+        let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir)
1106 1108
       endif
1107 1109
       let msg = s:format_message(v:shell_error ? 'x': '-', name, out)
1108 1110
       if v:shell_error

+ 38
- 18
home/.config/nvim/init.vim View File

@@ -13,7 +13,7 @@ exec "let $PATH=\"" . vimrc_root . "/node_modules/.bin:\" . $PATH"
13 13
 set laststatus=2
14 14
 set ruler number numberwidth=6 relativenumber
15 15
 set guicursor=
16
-set cursorline nocursorcolumn
16
+set cursorline cursorcolumn
17 17
 set sidescrolloff=1 sidescroll=1
18 18
 set conceallevel=2 concealcursor=nivc
19 19
 set foldenable foldminlines=3 foldmethod=syntax
@@ -123,6 +123,7 @@ endfunc
123 123
 func! s:adapt_terminal() abort
124 124
   setl noruler nocursorcolumn nocursorline norelativenumber nonumber
125 125
   setl signcolumn=no foldcolumn=0
126
+  silent! IndentLinesDisable
126 127
 endfunc
127 128
 
128 129
 func! s:terminal_kill_extra_buffers() abort
@@ -193,10 +194,6 @@ func! s:DockerComposeTransform(cmd) abort
193 194
   return 'docker-compose run ' . b:test_docker_compose_service . ' '.shellescape(a:cmd)
194 195
 endfunction
195 196
 
196
-func! s:jedi_auto_force_py_version() abort
197
-  call jedi#force_py_version(pyenv#python#get_internal_major_version())
198
-endfunction
199
-
200 197
 func! s:goyo_enter() abort
201 198
   Limelight
202 199
   silent !tmux set status off
@@ -255,6 +252,7 @@ Plug 'tpope/vim-sensible'
255 252
 Plug 'tpope/vim-repeat'
256 253
 Plug 'tpope/vim-endwise'
257 254
 Plug 'tpope/vim-surround'
255
+Plug 'yggdroot/indentline'
258 256
 Plug 'tpope/vim-eunuch'
259 257
 Plug 'tpope/vim-speeddating'
260 258
 Plug 'tpope/vim-projectionist'
@@ -266,6 +264,8 @@ Plug 'direnv/direnv.vim'
266 264
 Plug 'w0rp/ale'
267 265
 Plug 'RRethy/vim-illuminate'
268 266
 Plug 'wincent/terminus'
267
+Plug 'idanarye/vim-vebugger'
268
+Plug 'Shougo/vimproc.vim', {'do' : 'make'}
269 269
 Plug 'tpope/vim-commentary'
270 270
       \ | Plug 'cbaumhardt/vim-commentary-boxed'
271 271
 Plug 'xolox/vim-misc'
@@ -327,6 +327,7 @@ Plug 'ncm2/nvim-typescript', {
327 327
 Plug 'HerringtonDarkholme/yats.vim'
328 328
 Plug 'tweekmonster/braceless.vim'
329 329
 Plug 'othree/es.next.syntax.vim'
330
+Plug 'othree/jspc.vim'
330 331
 Plug 'gorodinskiy/vim-coloresque'
331 332
 Plug 'kana/vim-textobj-user'
332 333
 Plug 'reedes/vim-pencil'
@@ -404,7 +405,11 @@ let g:LanguageClient_serverCommands = {
404 405
 let g:LanguageClient_completionPreferTextEdit = 1
405 406
 " }}}
406 407
 " {{{2 misc
407
-let g:signify_vcs_list              = [ 'git', 'bzr' ]
408
+let g:indentLine_char = '┊'
409
+let g:indentLine_showFirstIndentLevel = 0
410
+let g:indentLine_faster = 0
411
+let g:indentLine_fileTypeExclude = ['startify', 'help']
412
+let g:signify_vcs_list = [ 'git', 'bzr' ]
408 413
 let g:pyenv#auto_activate = 1
409 414
 let g:pyenv#auto_create_ctags = 1
410 415
 let g:pyenv#auto_assign_ctags = 1
@@ -414,7 +419,7 @@ if executable('ag')
414 419
   set grepformat=%f:%l:%c:%m
415 420
 endif
416 421
 let g:python_highlight_all = 1
417
-let g:python_slow_sync = 1
422
+let g:python_slow_sync = 0
418 423
 let g:python3_host_prog = systemlist('PYENV_VERSION=neovim-py3 pyenv which python3')[0]
419 424
 let g:python_host_prog = systemlist('PYENV_VERSION=neovim-py2 pyenv which python2')[0]
420 425
 let g:endwise_no_mappings = 1
@@ -427,10 +432,30 @@ let g:ale_php_phpcs_executable = 'phpenv exec composer global exec phpcs'
427 432
 let g:ale_php_phpcbf_executable = 'phpenv exec composer global exec phpcbf'
428 433
 let g:ale_linter_aliases = {'vue': ''}
429 434
 let g:ale_vue_vls_use_global = 0
430
-let g:ale_linters = {'vue': ['vls'], 'typescript': ['tslint', 'tsserver'], 'javascript': ['importj']}
431
-let g:ale_fixers = {'vue': ['vls'], 'json': ['jq', 'trim_whitespace', 'remove_trailing_lines'], 'typescript': ['tslint']}
432 435
 let g:ale_typescript_tslint_use_global = 0
433 436
 let g:ale_typescript_tslint_ignore_empty_files = 1
437
+
438
+let s:ale_linters = {'vue': ['vls'], 'typescript': ['tslint', 'tsserver'], 'javascript': ['importj']}
439
+let s:ale_fixers = {
440
+      \ 'vue': ['vls'], 
441
+      \ 'json': ['jq', 'trim_whitespace', 'remove_trailing_lines'],
442
+      \ 'typescript': ['tslint'],
443
+      \ 'ruby': ['rubocop', 'trim_whitespace', 'remove_trailing_lines'],
444
+      \ 'python': ['autopep8', 'add_blank_lines_for_python_control_statements', 'isort', 'yapf', 'trim_whitespace', 'remove_trailing_lines']
445
+      \}
446
+
447
+if !exists('g:ale_linters')
448
+  let g:ale_linters = s:ale_linters
449
+else
450
+  extend(g:ale_linters, s:ale_linters)
451
+endif
452
+
453
+if !exists('g:ale_fixers')
454
+  let g:ale_fixers = s:ale_fixers
455
+else
456
+  extend(g:ale_fixers, s:ale_fixers)
457
+endif
458
+
434 459
 " 2}}}
435 460
 "
436 461
 " {{{2 vim-test
@@ -577,6 +602,7 @@ let g:jedi#goto_definitions_command = '<leader>jd'
577 602
 let g:jedi#usages_command = '<leader>jn'
578 603
 let g:jedi#rename_command = '<leader>jr'
579 604
 let g:jedi#smart_auto_mappings = 0
605
+let g:jedi#force_py_version = 'auto'
580 606
 " 2}}}
581 607
 let g:rooter_use_lcd = 1
582 608
 " {{{2 orgmode
@@ -590,7 +616,7 @@ let g:org_todo_keywords = [['TODO(t)', 'ACTIVE(a)', '|', 'DONE(d)'],
590 616
 " 2}}}
591 617
 " {{{2 startify
592 618
 let g:startify_list_order = ['commands', 'sessions', 'bookmarks', 'files', 'dir']
593
-let g:startify_files_number = 20
619
+let g:startify_files_number = 5
594 620
 let g:startify_change_to_dir = 0
595 621
 let g:startify_fortune_use_unicode = 1
596 622
 let g:startify_session_before_save = [
@@ -608,7 +634,7 @@ let g:localvimrc_whitelist = [expand('$HOME/.lvimrc')]
608 634
 " {{{2 airline
609 635
 let g:airline_powerline_fonts = 1
610 636
 let g:airline#extensions#disable_rtp_load = 1
611
-let g:airline_extensions = ['branch', 'tabline', 'ale', 'branch', 'tagbar', 'hunks', 'gutentags', 'cursormode']
637
+let g:airline_extensions = ['branch', 'tabline', 'ale', 'branch', 'tagbar', 'hunks', 'cursormode']
612 638
 let g:airline#extensions#quickfix#quickfix_text = 'Q'
613 639
 let g:airline#extensions#quickfix#location_text = 'L'
614 640
 let g:airline#extensions#branch#displyed_head_limit = 15
@@ -633,7 +659,7 @@ let g:goyo_width = '100'
633 659
 let g:goyo_height = '75%'
634 660
 
635 661
 filetype plugin indent on
636
-syntax on
662
+syntax off
637 663
 " }}}
638 664
 
639 665
 let s:mappings = {
@@ -825,9 +851,3 @@ augroup vimrc_goyo
825 851
 augroup END
826 852
 
827 853
 command! Today call <SID>LaunchNoteOfTheDay()
828
-
829
-augroup vim-pyenv-custom-augroup
830
-  autocmd! *
831
-  autocmd User vim-pyenv-activate-post   call <SID>jedi_auto_force_py_version()
832
-  autocmd User vim-pyenv-deactivate-post call <SID>jedi_auto_force_py_version()
833
-augroup END

+ 2
- 2
home/.vimrc_background View File

@@ -1,3 +1,3 @@
1
-if !exists('g:colors_name') || g:colors_name != 'base16-bright'
2
-  colorscheme base16-bright
1
+if !exists('g:colors_name') || g:colors_name != 'base16-oceanicnext'
2
+  colorscheme base16-oceanicnext
3 3
 endif

Loading…
Cancel
Save