[[plugins]]
repo = 'junegunn/fzf'
lazy = true
merged = false
build = 'go install'

[[plugins]]
repo = 'junegunn/fzf.vim'
depends = 'fzf'
on_func = 'fzf#'
on_cmd = ['FzfPlugins', 'FzfMrw', 'GhqFind']
hook_add = '''
  let g:fzf_command_prefix = 'Fzf'
  call add(g:AlterCommands, #{ char: 'fp', input: 'FzfPlugins' })
  nmap <space>fz <Cmd>FzfMrw<CR>
  call add(g:AlterCommands, #{ char: 'fq', input: 'GhqFind' })
'''
hooks_file = '$DEIN_CONFIG_DIR/fzf.vim.lua'

[[plugins]]
repo = 'yuki-yano/fzf-preview.vim'
if = "executable('node')"
depends = ['fzf.vim', 'coc.nvim']
on_cmd = [
  'FzfPreviewGitActions',
  'FzfPreviewMruFiles',
  'FzfPreviewProjectMruFiles',
  'FzfPreviewProjectFiles',
]
hook_add = '''
  nmap <space>af <Cmd>FzfPreviewGitActions<CR>
'''

[[plugins]]
repo = 'ibhagwan/fzf-lua'
if = "executable('fzf')"
depends = ['nvim-web-devicons', 'nvim-treesitter']
on_lua = 'fzf-lua'
on_cmd = 'FzfLua'
lua_add = '''
  vim.keymap.set('n', '<Plug>(ff-files)', '<Cmd>FzfLua files<CR>')
  vim.keymap.set('n', '<Plug>(ff-config_files)', function()
    require('fzf-lua').files {
      cwd = ('%s/chezmoi'):format(vim.env.XDG_DATA_HOME)
    }
  end)
  vim.keymap.set('n', '<Plug>(ff-grep)', '<Cmd>FzfLua grep<CR>')
  vim.keymap.set('n', '<Plug>(ff-help_tags)', '<Cmd>FzfLua help_tags<CR>')
  vim.keymap.set('n', '<Plug>(ff-buffers)', '<Cmd>FzfLua buffers<CR>')
  vim.keymap.set('n', '<Plug>(ff-buffers)', '<Cmd>FzfLua buffers<CR>')
  vim.keymap.set('n', '<Plug>(ff-lines)', '<Cmd>FzfLua blines<CR>')
  vim.keymap.set('n', '<Plug>(ff-resume)', '<Cmd>FzfLua resume<CR>')
  vim.keymap.set('n', '<Plug>(ff-lsp_references)', '<Cmd>FzfLua lsp_references<CR>')
  vim.keymap.set('n', '<Plug>(ff-lsp_implementations)', '<Cmd>FzfLua lsp_implementations<CR>')
'''
hooks_file = '$DEIN_CONFIG_DIR/fzf-lua.lua'