Restore old init.vim
This commit is contained in:
		
							parent
							
								
									db37bf1d54
								
							
						
					
					
						commit
						f1ee5b1aff
					
				
							
								
								
									
										76
									
								
								init.vim
									
									
									
									
									
								
							
							
						
						
									
										76
									
								
								init.vim
									
									
									
									
									
								
							@ -3,24 +3,35 @@ set nocompatible
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
" PLUGNIS ###########################################################{{{
 | 
					" PLUGNIS ###########################################################{{{
 | 
				
			||||||
call plug#begin()
 | 
					call plug#begin()
 | 
				
			||||||
 | 
					if has('nvim')
 | 
				
			||||||
" Conquer of Completion
 | 
					  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
 | 
				
			||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
 | 
					else
 | 
				
			||||||
 | 
					  Plug 'Shougo/deoplete.nvim'
 | 
				
			||||||
 | 
					  Plug 'roxma/nvim-yarp'
 | 
				
			||||||
 | 
					  Plug 'roxma/vim-hug-neovim-rpc'
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" General plugins
 | 
					" General plugins
 | 
				
			||||||
Plug 'vim-airline/vim-airline'
 | 
					Plug 'vim-airline/vim-airline'
 | 
				
			||||||
Plug 'vim-airline/vim-airline-themes'
 | 
					Plug 'vim-airline/vim-airline-themes'
 | 
				
			||||||
Plug 'https://gitea.tforgione.fr/tforgione/peach.git'
 | 
					Plug 'https://gitea.tforgione.fr/tforgione/peach.git'
 | 
				
			||||||
Plug 'scrooloose/nerdtree'
 | 
					Plug 'scrooloose/nerdtree'
 | 
				
			||||||
 | 
					Plug 'w0rp/ale'
 | 
				
			||||||
Plug 'tpope/vim-abolish'
 | 
					Plug 'tpope/vim-abolish'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Language specific plugins
 | 
					" Language specific plugins
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" C++
 | 
				
			||||||
 | 
					Plug 'Shougo/deoplete-clangx'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Rust
 | 
					" Rust
 | 
				
			||||||
Plug 'rust-lang/rust.vim'
 | 
					Plug 'rust-lang/rust.vim'
 | 
				
			||||||
 | 
					Plug 'racer-rust/vim-racer'
 | 
				
			||||||
 | 
					Plug 'sebastianmarkow/deoplete-rust'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Elm
 | 
					" Elm
 | 
				
			||||||
Plug 'ElmCast/elm-vim'
 | 
					Plug 'ElmCast/elm-vim'
 | 
				
			||||||
 | 
					Plug 'antew/vim-elm-language-server'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Toml
 | 
					" Toml
 | 
				
			||||||
Plug 'cespare/vim-toml'
 | 
					Plug 'cespare/vim-toml'
 | 
				
			||||||
@ -45,7 +56,6 @@ set expandtab
 | 
				
			|||||||
set tabstop=4
 | 
					set tabstop=4
 | 
				
			||||||
set shiftwidth=4
 | 
					set shiftwidth=4
 | 
				
			||||||
set autoindent
 | 
					set autoindent
 | 
				
			||||||
set tw=120
 | 
					 | 
				
			||||||
" }}}
 | 
					" }}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" UI CONFIG #########################################################{{{
 | 
					" UI CONFIG #########################################################{{{
 | 
				
			||||||
@ -147,49 +157,11 @@ let g:markdown_composer_browser = 'firefox'
 | 
				
			|||||||
let g:instant_markdown_autostart = 0
 | 
					let g:instant_markdown_autostart = 0
 | 
				
			||||||
" }}}
 | 
					" }}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" COC CONFIG ########################################################{{{
 | 
					" CODE COMPLETION ###################################################{{{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Use `[g` and `]g` to navigate diagnostics
 | 
					" Use deoplete
 | 
				
			||||||
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
 | 
					let g:deoplete#enable_at_startup = 1
 | 
				
			||||||
nmap <silent> gp <Plug>(coc-diagnostic-prev)
 | 
					autocmd FileType elm call deoplete#custom#buffer_option('auto_complete', v:false)
 | 
				
			||||||
nmap <silent> gn <Plug>(coc-diagnostic-next)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" GoTo code navigation.
 | 
					 | 
				
			||||||
nmap <silent> gd <Plug>(coc-definition)
 | 
					 | 
				
			||||||
nmap <silent> gy <Plug>(coc-type-definition)
 | 
					 | 
				
			||||||
nmap <silent> gi <Plug>(coc-implementation)
 | 
					 | 
				
			||||||
nmap <silent> gr <Plug>(coc-references)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Add `:Format` command to format current buffer.
 | 
					 | 
				
			||||||
command! -nargs=0 Format :call CocAction('format')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Use K to show documentation in preview window.
 | 
					 | 
				
			||||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function! s:show_documentation()
 | 
					 | 
				
			||||||
  if (index(['vim','help'], &filetype) >= 0)
 | 
					 | 
				
			||||||
    execute 'h '.expand('<cword>')
 | 
					 | 
				
			||||||
  elseif (coc#rpc#ready())
 | 
					 | 
				
			||||||
    call CocActionAsync('doHover')
 | 
					 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    execute '!' . &keywordprg . " " . expand('<cword>')
 | 
					 | 
				
			||||||
  endif
 | 
					 | 
				
			||||||
endfunction
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
 | 
					 | 
				
			||||||
" delays and poor user experience.
 | 
					 | 
				
			||||||
set updatetime=300
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Highlight the symbol and its references when holding the cursor.
 | 
					 | 
				
			||||||
autocmd CursorHold * silent call CocActionAsync('highlight')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Symbol renaming.
 | 
					 | 
				
			||||||
nmap <leader>rn <Plug>(coc-rename)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Formatting selected code.
 | 
					 | 
				
			||||||
xmap <leader>f  <Plug>(coc-format-selected)
 | 
					 | 
				
			||||||
nmap <leader>f  <Plug>(coc-format-selected)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Autoclose preview
 | 
					" Autoclose preview
 | 
				
			||||||
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
 | 
					autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
 | 
				
			||||||
@ -197,7 +169,19 @@ autocmd InsertLeave * if pumvisible() == 0|pclose|endif
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
" Complete on tab
 | 
					" Complete on tab
 | 
				
			||||||
inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"
 | 
					inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" }}}
 | 
					" }}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" CUSTOM THINGS DEPENDING ON ENV ####################################{{{
 | 
					" CUSTOM THINGS DEPENDING ON ENV ####################################{{{
 | 
				
			||||||
let g:rustfmt_autosave = 1
 | 
					let g:rustfmt_autosave = 1
 | 
				
			||||||
 | 
					let g:ale_linters = {}
 | 
				
			||||||
 | 
					let g:ale_c_parse_compile_commands=1
 | 
				
			||||||
 | 
					let g:ale_elm_ls_use_global = 1
 | 
				
			||||||
 | 
					let g:ale_linters_ignore = { 'elm': ['make'] }
 | 
				
			||||||
 | 
					let g:ale_lint_on_text_changed = 0
 | 
				
			||||||
 | 
					if $NVIM_DISABLE_PYTHON_LINTER == '1'
 | 
				
			||||||
 | 
					    let g:ale_linters.python = []
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					if $NVIM_DISABLE_JAVA_LINTER == '1'
 | 
				
			||||||
 | 
					    let g:ale_linters.java = []
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user