Skip to content

Commit 84dbbcf

Browse files
committed
feat: configurable height
1 parent 682390d commit 84dbbcf

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lua/dap-view/breakpoints/actions.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
local setup = require("dap-view.setup")
2+
13
local M = {}
24

35
local api = vim.api
@@ -43,10 +45,11 @@ M._jump_to_breakpoint = function()
4345
end)
4446

4547
if not prev_or_new_window then
48+
local config = setup.config
4649
prev_or_new_window = api.nvim_open_win(0, true, {
4750
split = "above",
4851
win = 0,
49-
height = vim.o.lines - 15,
52+
height = vim.o.lines - config.windows.height,
5053
})
5154
end
5255

lua/dap-view/config.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,22 @@ local M = {}
55
---@field sections SectionType[]
66
---@field default_section SectionType
77

8+
---@class WindowsConfig
9+
---@field height integer
10+
811
--- @alias SectionType '"breakpoints"' | '"exceptions"' | '"watches"'
912

1013
---@class Config
1114
---@field winbar WinbarConfig
15+
---@field windows WindowsConfig
1216
M.config = {
1317
winbar = {
1418
sections = { "breakpoints", "exceptions", "watches" },
1519
default_section = "breakpoints",
1620
},
21+
windows = {
22+
height = 15,
23+
},
1724
}
1825

1926
return M

0 commit comments

Comments
 (0)