local M = {}
local conf = require('user.modules.tools.config')

M['nvim-telescope/telescope.nvim'] = { -- TODO: check out fzf-lua
    keys = '<leader>fj',
    cmd = 'Telescope',
    wants = {
        'popup.nvim',
        'plenary.nvim',
        'yabs.nvim',
        'telescope-symbols.nvim',
        'telescope-project.nvim',
        'telescope-file-browser.nvim',
        'telescope-fzf-native.nvim',
    },
    requires = {
        { 'FollieHiyuki/telescope-symbols.nvim', opt = true },
        { 'nvim-telescope/telescope-project.nvim', opt = true },
        { 'nvim-telescope/telescope-file-browser.nvim', opt = true },
        { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', opt = true },
    },
    config = conf.telescope,
}
M['pwntester/octo.nvim'] = { -- TODO: colors + config
    cmd = 'Octo',
    wants = 'telescope.nvim',
    config = conf.octo,
}
M['TimUntersberger/neogit'] = {
    cmd = 'Neogit',
    wants = { 'diffview.nvim', 'plenary.nvim' },
    requires = {
        {
            'sindrets/diffview.nvim',
            cmd = {
                'DiffviewOpen',
                'DiffviewClose',
                'DiffviewToggleFiles',
                'DiffviewFocusFiles',
            },
            config = conf.diffview,
            opt = true,
        },
    },
    config = conf.neogit,
}
M['pianocomposer321/yabs.nvim'] = {
    cmd = { 'YabsTask', 'YabsDefaultTask' },
    config = conf.yabs,
}
M['iamcco/markdown-preview.nvim'] = {
    run = 'cd app && yarn install',
    ft = { 'markdown', 'rmd' },
    config = conf.markdown_preview,
}
M['ray-x/web-tools.nvim'] = {
    cmd = { 'BrowserSync', 'BrowserPreview', 'TagRename' },
    config = conf.web_tools,
}
M['nvim-pack/nvim-spectre'] = {
    keys = '<leader>p',
    wants = 'plenary.nvim',
    config = conf.spectre,
}
M['mbbill/undotree'] = {
    cmd = 'UndotreeToggle',
    setup = conf.undotree,
}
M['akinsho/toggleterm.nvim'] = {
    cmd = 'ToggleTerm',
    config = conf.toggleterm,
}
M['michaelb/sniprun'] = {
    run = 'cargo build --release',
    cmd = 'SnipRun',
    config = conf.sniprun,
}
M['NTBBloodbath/rest.nvim'] = {
    keys = { '<Plug>RestNvim', '<Plug>RestNvimPreview', '<Plug>RestNvimLast' },
    wants = { 'plenary.nvim', 'nvim-treesitter' },
    config = conf.rest,
}
M['folke/persistence.nvim'] = { -- TODO: check out auto-session + session-lens
    event = 'BufReadPre',
    keys = '<leader>s',
    config = conf.persistence,
}
M['kazhala/close-buffers.nvim'] = {
    cmd = { 'BDelete', 'BWipeout' },
    wants = 'bufferline.nvim',
    config = conf.close_buffers,
}
M['sindrets/winshift.nvim'] = {
    cmd = 'WinShift',
    config = conf.winshift,
}
M['ten3roberts/window-picker.nvim'] = {
    cmd = { 'WindowPick', 'WindowSwap', 'WindowSwapStay' },
    config = conf.window_picker,
}
M['dstein64/vim-startuptime'] = { cmd = 'StartupTime' } -- Just for benchmarking

return M
