" =============== Plugins ================================================ call plug#begin('~/.config/nvim/plugged') Plug 'https://github.com/vim-airline/vim-airline' " status bset mouse=aar on the bottom Plug 'https://github.com/preservim/nerdtree' " file tree Plug 'https://github.com/airblade/vim-gitgutter' " git diff " Plug 'https://github.com/weilbith/nvim-code-action-menu' " fix my shit helper window :) Plug 'neoclide/coc.nvim', {'branch': 'release'} " code completion call plug#end() " =============== Vannila vim config ================================================ :set clipboard=unnamedplus :set relativenumber :windo set nowrap :set showcmd :set mouse=a " :set cursorline :set foldmethod=syntax :set updatetime=250 :set tabstop=4 shiftwidth=4 smarttab :highlight Comment ctermfg=Grey :set background=light " =============== NERDTree Config ================================================ :let NERDTreeShowHidden=1 " =============== COC Config ================================================ inoremap \ coc#pum#visible() ? coc#pum#next(1) : \ CheckBackspace() ? "\" : \ coc#refresh() inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" function! CheckBackspace() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction " Highlight the variable on hold autocmd CursorHold * silent call CocActionAsync('highlight') " coc rename nnoremap rr (coc-rename) " Toggle file browser nnoremap :NERDTreeToggle " Jump between references and definiton nnoremap :call CocActionAsync('jumpReferences') nnoremap K :call CocActionAsync('jumpDefinition') " show help menu nnoremap :call CocActionAsync('codeAction', 'cursor') " Show Documentation nnoremap J :call ShowDocumentation() function! ShowDocumentation() " Show hover when provider exists, fallback to vim's builtin behavior. if CocAction('hasProvider', 'hover') call CocActionAsync('definitionHover') else call feedkeys('K', 'in') endif endfunction