3

if !exists('g:syntax_on')

 2 months ago
source link: https://pastebin.com/Nz1pbsSD
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Advertisement
Guest User

Untitled

a guest

Sep 15th, 2022

Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if !exists('g:syntax_on')
  2. 1 syntax on
  3. 2 endif
  4. 3 filetype plugin indent on
  5. 4 set ts=2 sts=2 sw=2 et ai si
  6. 5 set rnu
  7. 7 call plug#begin()
  8. 9 Plug 'neoclide/coc.nvim'
  9. 10 Plug 'jiangmiao/auto-pairs'
  10. 11 Plug 'gruvbox-community/gruvbox'
  11. 12 Plug 'vim-airline/vim-airline'
  12. 13 Plug 'vim-airline/vim-airline-themes'
  13. 14 Plug 'preservim/nerdtree'
  14. 16 call plug#end()
  15. 18 function! CheckBackspace() abort
  16. 19 let col = col('.') - 1
  17. 20 return !col || getline('.')[col - 1] =~# '\s'
  18. 21 endfunction
  19. 23 inoremap <expr> <cr> coc#pum#visible() ? coc#_select_confirm() : "\<CR>"
  20. 25 inoremap <silent><expr> <Tab>
  21. 26 \ coc#pum#visible() ? coc#pum#next(1) :
  22. 27 \ CheckBackspace() ? "\<Tab>" :
  23. 28 \ coc#refresh()
  24. 30 set termguicolors
  25. 31 colo gruvbox
  26. 34 inoremap <c-b> <Esc>:NERDTreeToggle<cr>
  27. 35 nnoremap <c-b> <Esc>:NERDTreeToggle<cr>
  28. 37 nmap <silent> [c <Plug>(coc-diagnostic-prev)
  29. 38 nmap <silent> ]c <Plug>(coc-diagnostic-next)
  30. 39 nmap <silent> [d <Plug>(coc-diagnostic-prev-error)
  31. 40 nmap <silent> ]d <Plug>(coc-diagnostic-next-error)
  32. 41 nmap <silent> [e :call CocAction('diagnosticList')<CR>
  33. 42 nmap <silent> [f <plug>(coc-diagnostics)
  34. 44 nmap <silent> gd <Plug>(coc-definition)
  35. 45 nmap <silent> gy <Plug>(coc-type-definition)
  36. 46 nmap <silent> gi <Plug>(coc-implementation)
  37. 47 nmap <silent> gr <Plug>(coc-references)
  38. 49 nmap <F2> <Plug>(coc-rename)
  39. 51 nnoremap <silent> <F3> :call <SID>show_documentation()<CR>
  40. 53 function! s:show_documentation()
  41. 54 if (index(['vim','help'], &filetype) >= 0)
  42. 55 execute 'h '.expand('<cword>')
  43. 56 else
  44. 57 call CocAction('doHover')
  45. 58 endif
  46. 59 endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK