From b546ffebf07134db0ab451c8272edd149afdf7f1 Mon Sep 17 00:00:00 2001 From: mpaulson Date: Mon, 4 Dec 2023 10:48:07 -0700 Subject: [PATCH] feat: borders are now customizable --- lua/harpoon/config.lua | 2 ++ lua/harpoon/ui.lua | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/harpoon/config.lua b/lua/harpoon/config.lua index 966f19e..abd7998 100644 --- a/lua/harpoon/config.lua +++ b/lua/harpoon/config.lua @@ -24,6 +24,7 @@ M.DEFAULT_LIST = DEFAULT_LIST ---@field get_root_dir? fun(): string ---@class HarpoonSettings +---@field border_chars string[] defaults to { "─", "│", "─", "│", "╭", "╮", "╯", "╰" } ---@field save_on_toggle boolean defaults to true ---@field key (fun(): string) @@ -52,6 +53,7 @@ function M.get_default_config() settings = { save_on_toggle = false, + border_chars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, key = function() return vim.loop.cwd() end, diff --git a/lua/harpoon/ui.lua b/lua/harpoon/ui.lua index 9d809c2..1e9e9e7 100644 --- a/lua/harpoon/ui.lua +++ b/lua/harpoon/ui.lua @@ -66,8 +66,7 @@ function HarpoonUI:_create_window() end local height = 8 - local borderchars = - { "─", "│", "─", "│", "╭", "╮", "╯", "╰" } + local borderchars = self.settings.border_chars local bufnr = vim.api.nvim_create_buf(false, false) local _, popup_info = popup.create(bufnr, { title = "Harpoon",