1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-31 00:17:46 +02:00

friendship ended with deoplete, coc is my new best friend

This commit is contained in:
TiynGER 2020-04-03 00:38:05 +02:00
parent 724ebb6161
commit 6dcd58adc9

View File

@ -107,13 +107,11 @@ autocmd BufWritePre * %s/\s\+$//e
" Plugin section " Plugin section
call plug#begin('~/.config/nvim/plugged') call plug#begin('~/.config/nvim/plugged')
" Autocorrect " Autocomplete
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Latex Upgrades " Latex Upgrades
Plug 'donRaphaco/neotex', { 'for': 'tex'} Plug 'donRaphaco/neotex', { 'for': 'tex'}
Plug 'lervag/vimtex', {'for': 'tex'} Plug 'lervag/vimtex', {'for': 'tex'}
" Java Upgrades
Plug 'artur-shaik/vim-javacomplete2'
" Indexing and Overview tools " Indexing and Overview tools
Plug 'preservim/nerdtree' Plug 'preservim/nerdtree'
Plug 'majutsushi/tagbar' Plug 'majutsushi/tagbar'
@ -123,37 +121,26 @@ Plug 'airblade/vim-gitgutter'
Plug 'FredKSchott/CoVim' Plug 'FredKSchott/CoVim'
" Bulk Renamer " Bulk Renamer
Plug 'qpkorr/vim-renamer' Plug 'qpkorr/vim-renamer'
" Python3 Upgrades
Plug 'zchee/deoplete-jedi'
call plug#end() call plug#end()
"tagbar "tagbar
map <F3> :TagbarToggle<CR> map <F3> :TagbarToggle<CR>
let g:tagbar_left = 1
"nerdtree "nerdtree
map <F2> :NERDTreeToggle<CR> map <F2> :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
let g:NERDTreeWinPos = "right" let g:NERDTreeWinPos = "left"
"neotex "neotex
let g:neotex_enabled = 2 let g:neotex_enabled = 2
"deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1
let g:deoplete#sources = {}
let g:deoplete#sources.java = ['jc', 'javacomplete2', 'file', 'buffer']
call deoplete#custom#var('omni', 'input_patterns', {
\ 'tex': g:vimtex#re#deoplete
\})
""tab as remapping for deoplete
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ deoplete#mappings#manual_complete()
function! s:check_back_space() abort "" {{{
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction "" }}}
" javacomplete2
autocmd FileType java setlocal omnifunc=javacomplete#Complete
" CoVim " CoVim
let CoVim_default_name = "TiynGER" let CoVim_default_name = "TiynGER"
let CoVim_default_port = "7000" let CoVim_default_port = "7000"
" Coc
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction