[download]

vim/plugins.vim

   1 call mkdir(expand('~/.vim/autoload'), 'p')
   2 
   3 if !filereadable(expand('~/.vim/autoload/plug.vim')) " {{{
   4     silent !curl -sfo ~/.vim/autoload/plug.vim
   5     \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
   6 endif " }}}
   7 if !filereadable(expand('~/.vim/autoload/plug.vim')) " {{{
   8     silent !wget -qO ~/.vim/autoload/plug.vim
   9     \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  10 endif " }}}
  11 
  12 call plug#begin('~/.vim/plugins')
  13 
  14 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  15 
  16 Plug 'https://github.com/vimwiki/vimwiki'
  17 Plug 'https://github.com/michal-h21/vimwiki-sync'
  18 
  19 let vimwiki_list = [{
  20     \ 'path': '~/Заметки',
  21     \ 'index': 'Индекс',
  22     \ 'auto_tags': 1,
  23     \
  24     \ 'auto_toc': 1,
  25     \ 'auto_generate_links': 1,
  26     \ 'auto_generate_tags':  1,
  27     \
  28     \ 'diary_rel_path': './',
  29     \ 'diary_index':  'Блоге',
  30     \ 'diary_header': 'Блоге',
  31     \ 'auto_diary_index': 1,
  32     \
  33     \ 'path_html':     '~/Заметки/html',
  34     \ 'template_path': '~/Заметки/meta',
  35     \ 'auto_export': 1,
  36 \ }]
  37 let vimwiki_global_ext   = 0
  38 let vimwiki_toc_header   = 'Содержание'
  39 let vimwiki_links_header = 'Страницы'
  40 let vimwiki_tags_header  = 'Теги'
  41 let vimwiki_diary_months = {
  42     \ 1:  'Январь',   2: 'Февраль', 3: 'Март',
  43     \ 4:  'Апрель',   5: 'Май',     6: 'Июнь',
  44     \ 7:  'Июль',     8: 'Август',  9: 'Сентябрь',
  45     \ 10: 'Октябрь', 11: 'Ноябрь', 12: 'Декабрь'
  46 \ }
  47 
  48 au FileType vimwiki setl sw=2
  49 au FileType vimwiki nnoremap <buffer>        <F5> :up \| silent Vimwiki2HTML<Cr>
  50 au FileType vimwiki nnoremap <buffer>        <F6> :up \| Vimwiki2HTMLBrowse<Cr>
  51 au FileType vimwiki inoremap <buffer> <expr> <Cr> pumvisible() ? '<Cr>' : '<Esc>:VimwikiReturn 1 5<Cr>'
  52 
  53 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  54 
  55 Plug 'https://github.com/ctrlpvim/ctrlp.vim'
  56 Plug 'https://github.com/adelarsq/vim-matchit'
  57 Plug 'https://github.com/tpope/vim-commentary'
  58 Plug 'https://github.com/junegunn/vim-peekaboo'
  59 Plug 'https://github.com/nelstrom/vim-visual-star-search'
  60 
  61 let ctrlp_prompt_mappings = {
  62     \ 'AcceptSelection("e")': ['<2-LeftMouse>'],
  63     \ 'AcceptSelection("t")': ['<Cr>', '<C-t>'],
  64 \ }
  65 
  66 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  67 
  68 Plug 'https://github.com/junegunn/gv.vim'
  69 Plug 'https://github.com/jreybert/vimagit'
  70 Plug 'https://github.com/mhinz/vim-signify'
  71 Plug 'https://github.com/tpope/vim-fugitive'
  72 
  73 let signify_sign_show_text = 0
  74 au FileType *git* setl sw=2 fdl=9 nocul
  75 
  76 nnoremap <Leader>G :GV!<Cr>
  77 nnoremap <Leader>g :up \| MagitOnly<Cr>
  78 nnoremap <C-r> :redraw! \| SignifyRefresh<Cr>
  79 
  80 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  81 
  82 Plug 'https://github.com/w0rp/ale'
  83 Plug 'https://github.com/lifepillar/vim-mucomplete'
  84 
  85 let ale_sign_error   = '>'
  86 let ale_sign_warning = '>'
  87 let ale_completion_autoimport = 1
  88 let ale_c_cc_options = '-std=gnu11 -Wall'
  89 
  90 let mucomplete#cycle_with_trigger = 1
  91 let mucomplete#enable_auto_at_startup = 1
  92 let mucomplete#minimum_prefix_length  = 1
  93 let mucomplete#always_use_completeopt = 1
  94 let mucomplete#spel#regex = '[a-zA-Zа-яА-Я]'
  95 let mucomplete#chains = { 'default': {
  96     \   'default'  : ['path', 'uspl', 'c-n', 'omni'],
  97     \ '.*string.*' : ['path', 'uspl', 'c-n'],
  98     \ '.*comment.*': ['path', 'uspl', 'c-n'],
  99 \ }}
 100 let mucomplete#can_complete = { 'default': {
 101     \ 'omni': { s -> s =~# '\m\S\%(\k\|\.\|->\|::\)$' },
 102 \ }}
 103 
 104 aut FileType ale-pr* setl wrap
 105 set omnifunc=ale#completion#OmniFunc
 106 
 107 nnoremap <Leader>K :ALEHover<Cr>
 108 nnoremap <Leader>a :ALEToggleBuffer<Cr>
 109 
 110 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 111 
 112 Plug 'https://github.com/ap/vim-css-color'
 113 Plug 'https://github.com/tpope/vim-endwise'
 114 Plug 'https://github.com/habamax/vim-godot'
 115 Plug 'https://github.com/jamessan/vim-gnupg'
 116 Plug 'https://github.com/andrewradev/id3.vim'
 117 Plug 'https://github.com/sheerun/vim-polyglot'
 118 
 119 au FileType gdscript nnoremap <buffer> <F5> :up \| GodotRun<Cr>
 120 au FileType gdscript nnoremap <buffer> <F6> :up \| GodotRunFZF<Cr>
 121 au FileType gdscript nnoremap <buffer> K    :ALEHover<Cr>
 122 
 123 nnoremap <Leader>c :call css_color#toggle()<Cr>
 124 
 125 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 126 
 127 call plug#end()
 128 call ale#linter#Define('gdscript', {
 129     \ 'name': 'godot',  'project_root': 'project.godot',
 130     \ 'lsp' : 'socket', 'address': '127.0.0.1:6008',
 131 \ })