Skip to content

Commit a84ab82

Browse files
authored
Merge pull request #644 from AmeerArsala/harpoon2
added option to specify height in lines of the window
2 parents 0378a6c + ba7848a commit a84ab82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/harpoon/ui.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ local Extensions = require("harpoon.extensions")
99
---@field ui_fallback_width? number used if we can't get the current window
1010
---@field ui_width_ratio? number this is the ratio of the editor window to use
1111
---@field ui_max_width? number this is the max width the window can be
12+
---@field height_in_lines? number this is the max height in lines that the window can be
1213

1314
---@return HarpoonToggleOptions
1415
local function toggle_config(config)
@@ -94,7 +95,7 @@ function HarpoonUI:_create_window(toggle_opts)
9495
width = toggle_opts.ui_max_width
9596
end
9697

97-
local height = 8
98+
local height = toggle_opts.height_in_lines or 8 -- 8 lines is default height
9899
local bufnr = vim.api.nvim_create_buf(false, true)
99100
local win_id = vim.api.nvim_open_win(bufnr, true, {
100101
relative = "editor",

0 commit comments

Comments
 (0)