Skip to content

Commit

Permalink
Merge pull request #644 from AmeerArsala/harpoon2
Browse files Browse the repository at this point in the history
added option to specify height in lines of the window
  • Loading branch information
ThePrimeagen authored Nov 13, 2024
2 parents 0378a6c + ba7848a commit a84ab82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/harpoon/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ local Extensions = require("harpoon.extensions")
---@field ui_fallback_width? number used if we can't get the current window
---@field ui_width_ratio? number this is the ratio of the editor window to use
---@field ui_max_width? number this is the max width the window can be
---@field height_in_lines? number this is the max height in lines that the window can be

---@return HarpoonToggleOptions
local function toggle_config(config)
Expand Down Expand Up @@ -94,7 +95,7 @@ function HarpoonUI:_create_window(toggle_opts)
width = toggle_opts.ui_max_width
end

local height = 8
local height = toggle_opts.height_in_lines or 8 -- 8 lines is default height
local bufnr = vim.api.nvim_create_buf(false, true)
local win_id = vim.api.nvim_open_win(bufnr, true, {
relative = "editor",
Expand Down

0 comments on commit a84ab82

Please sign in to comment.