mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-16 11:00:23 +00:00
feat: borders are now customizable
This commit is contained in:
parent
0a4c318493
commit
b546ffebf0
@ -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,
|
||||||
|
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user