[[plugins]]
repo = "Shougo/dein.vim"
hook_add = """
let g:dein#auto_recache = !has('win32')
function! s:dein_toml_syntax() abort
  if expand('%:p') =~# '\vrc/[^/]+.toml$'
    call dein#toml#syntax()
  endif
endfunction
augroup dein_augroup_internal
  autocmd!
  autocmd FileType toml ++nested call timer_start(0, {id->s:dein_toml_syntax()})
augroup END
"""

[[plugins]]
repo = "sainnhe/sonokai"
hook_add = """
if !has('gui_running')
  augroup colorschemeSetting
    autocmd!
    autocmd VimEnter * nested colorscheme sonokai | highlight FloatBorder ctermbg=NONE guibg=NONE
  augroup END
endif
let g:sonokai_style = 'espresso'
let g:sonokai_enable_italic = v:false
let g:sonokai_disable_italic_comment = v:true
"""

[[plugins]]
repo = "itchyny/lightline.vim"
hook_add = """
set noshowmode
let g:lightline = {
      \ 'colorscheme': 'sonokai',
      \ 'active': {
      \   'left': [
      \     ['mode', 'paste'],
      \     ['gitbranch', 'readonly', 'filename', 'modified'],
      \   ],
      \ },
      \ 'component_function': {
      \   'gitbranch': 'gitbranch#name',
      \   'filetype': 'LightlineFileType',
      \   'fileformat': 'LightlineFotmat',
      \   },
      \ }

function! LightlineFileType() abort
  if winwidth(0) > 70
    if strlen(&filetype) > 0
      return &filetype . ' ' . WebDevIconsGetFileTypeSymbol()
    else
      return 'no ft'
    endif
  else
    return ''
  endif
endfunction

function! LightlineFotmat() abort
  if winwidth(0) > 70
    return &fileformat .  ' ' . WebDevIconsGetFileFormatSymbol()
  else
    return ''
  endif
endfunction

let g:colors_map = {}
function! ChangeColor(colorname) abort
  execute 'colorscheme' . ' ' . a:colorname
  let g:lightline.colorscheme = get(g:colors_map, a:colorname, a:colorname)
  call lightline#enable()
endfunction
"""
depends = ["vim-devicons", 'vim-gitbranch']

[[plugins]]
repo = "itchyny/vim-gitbranch"

[[plugins]]
repo = "vim-jp/vimdoc-ja"
hook_add = """
if has('nvim')
  set helplang=en " default
else
  set helplang=ja
endif
"""

[[plugins]]
repo = "ryanoasis/vim-devicons"

[[plugins]]
repo = "lambdalisue/seethrough.vim"
hook_add = """
let g:seethrough_disabled = has('gui_running')
"""

[[plugins]]
repo = "mattn/vim-findroot"
hook_add = """
let g:findroot_not_for_subdir = v:false
"""

[[plugins]]
repo = "lambdalisue/fern.vim"
hook_add = """
let g:fern#disable_default_mappings = v:true
cnoreabbrev fe Fern .
cnoreabbrev fep Fern . -reveal=%
command! TFern tabnew | Fern .
"""
[plugins.ftplugin]
fern = """
nmap <buffer> q <C-o>
nmap <buffer> i <Plug>(fern-action-new-file)
nmap <buffer> o <Plug>(fern-action-new-dir)
nmap <buffer> r <Plug>(fern-action-rename)
nmap <buffer> dd <Plug>(fern-action-clipboard-move)
nmap <buffer> yy <Plug>(fern-action-clipboard-copy)
nmap <buffer> p <Plug>(fern-action-clipboard-paste)
nmap <buffer> h <Plug>(fern-action-collapse)
nmap <buffer> l <Plug>(fern-action-open-or-expand)
nmap <buffer> ! <Plug>(fern-action-hidden:toggle)
nmap <buffer> ? <Plug>(fern-action-help)  " This may be redundant
nmap <buffer> t <Plug>(fern-action-open:tabedit)
nmap <buffer><expr> <Plug>(fern-action-open-or-expand:stay) fern#smart#leaf("<Plug>(fern-action-open)", "<Plug>(fern-action-expand:stay)")
nmap <buffer><expr> <CR> getline('.') =~# '^\s*\|-\s'
      \ ? '<Plug>(fern-action-collapse)'
      \ : '<Plug>(fern-action-open-or-expand:stay)'
"""

[[plugins]]
repo = "lambdalisue/fern-hijack.vim"

[[plugins]]
repo = "vim-jp/vim-streem"

[[plugins]]
repo = "vim-scripts/fish.vim"

[[plugins]]
repo = "mityu/vim-applescript"

[[plugins]]
repo = "gko/vim-coloresque"

[[plugins]]
repo = "posva/vim-vue"

[[plugins]]
repo = "cespare/vim-toml"
if = "!has('nvim') && !has('patch-8.2.3532')"