feat: add configurable input window height for vertical layout (#773)

Co-authored-by: amojury <wujiajun880@gmail.com>
This commit is contained in:
JIAJUN 2024-11-03 16:48:37 +08:00 committed by GitHub
parent 7df1fe6656
commit 58e0165098
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 1 deletions

View File

@ -261,6 +261,7 @@ _See [config.lua#L9](./lua/avante/config.lua) for the full config_
}, },
input = { input = {
prefix = "> ", prefix = "> ",
height = 8, -- Height of the input window in vertical layout
}, },
edit = { edit = {
border = "rounded", border = "rounded",

View File

@ -172,6 +172,7 @@ Respect and use existing conventions, libraries, etc that are already present in
}, },
input = { input = {
prefix = "> ", prefix = "> ",
height = 8, -- Height of the input window in vertical layout
}, },
edit = { edit = {
border = "rounded", border = "rounded",

View File

@ -1415,7 +1415,7 @@ function Sidebar:create_input(opts)
local get_size = function() local get_size = function()
if self:get_layout() == "vertical" then return { if self:get_layout() == "vertical" then return {
height = 8, height = Config.windows.input.height,
} end } end
local selected_code_size = self:get_selected_code_size() local selected_code_size = self:get_selected_code_size()