require("full-border"):setup()
require("starship"):setup()

require("eza-preview"):setup({
    -- Determines the directory depth level to tree preview (default: 3)
    level = 3,

    -- Whether to follow symlinks when previewing directories (default: false)
    follow_symlinks = false,

    -- Whether to show target file info instead of symlink info (default: false)
    dereference = false,
})

-- You can configure your bookmarks by lua language
local bookmarks = {}

local path_sep = package.config:sub(1, 1)
local home_path = ya.target_family() == "windows" and os.getenv("USERPROFILE") or os.getenv("HOME")
if ya.target_family() == "windows" then
    table.insert(bookmarks, {
        tag = "Scoop Local",

        path = (os.getenv("SCOOP") or home_path .. "\\scoop") .. "\\",
        key = "p",
    })
    table.insert(bookmarks, {
        tag = "Scoop Global",
        path = (os.getenv("SCOOP_GLOBAL") or "C:\\ProgramData\\scoop") .. "\\",
        key = "P",
    })
end

require("yamb"):setup({
    -- Optional, the path ending with path seperator represents folder.
    bookmarks = bookmarks,
    -- Optional, recieve notification everytime you jump.
    jump_notify = true,
    -- Optional, the cli of fzf.
    cli = "fzf",
    -- Optional, a string used for randomly generating keys, where the preceding characters have higher priority.
    keys = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
    -- Optional, the path of bookmarks
    path = (ya.target_family() == "windows" and os.getenv("APPDATA") .. "\\yazi\\config\\bookmark")
        or (os.getenv("HOME") .. "/.config/yazi/bookmark"),
})

require("git"):setup()

require("yaziline"):setup({
    -- color = "#98c379", -- main theme color
    default_files_color = "darkgray", -- color of the file counter when it's inactive
    selected_files_color = "white",
    yanked_files_color = "green",
    cut_files_color = "red",

    separator_style = "curvy", -- "angly" | "curvy" | "liney" | "empty"
    separator_open = "",
    separator_close = "",
    separator_open_thin = "",
    separator_close_thin = "",
    separator_head = "",
    separator_tail = "",

    select_symbol = "",
    yank_symbol = "󰆐",

    filename_max_length = 24,         -- truncate when filename > 24
    filename_truncate_length = 6,     -- leave 6 chars on both sides
    filename_truncate_separator = "...", -- the separator of the truncated filename
})
