feat: borders are now customizable

This commit is contained in:
mpaulson 2023-12-04 10:48:07 -07:00
parent 0a4c318493
commit b546ffebf0
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ M.DEFAULT_LIST = DEFAULT_LIST
---@field get_root_dir? fun(): string ---@field get_root_dir? fun(): string
---@class HarpoonSettings ---@class HarpoonSettings
---@field border_chars string[] defaults to { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }
---@field save_on_toggle boolean defaults to true ---@field save_on_toggle boolean defaults to true
---@field key (fun(): string) ---@field key (fun(): string)
@ -52,6 +53,7 @@ function M.get_default_config()
settings = { settings = {
save_on_toggle = false, save_on_toggle = false,
border_chars = { "", "", "", "", "", "", "", "" },
key = function() key = function()
return vim.loop.cwd() return vim.loop.cwd()
end, end,

View File

@ -66,8 +66,7 @@ function HarpoonUI:_create_window()
end end
local height = 8 local height = 8
local borderchars = local borderchars = self.settings.border_chars
{ "", "", "", "", "", "", "", "" }
local bufnr = vim.api.nvim_create_buf(false, false) local bufnr = vim.api.nvim_create_buf(false, false)
local _, popup_info = popup.create(bufnr, { local _, popup_info = popup.create(bufnr, {
title = "Harpoon", title = "Harpoon",