From 58e0165098c8a4d4c832fd31e3d613a5c4b28a35 Mon Sep 17 00:00:00 2001 From: JIAJUN <30368439+amojury@users.noreply.github.com> Date: Sun, 3 Nov 2024 16:48:37 +0800 Subject: [PATCH] feat: add configurable input window height for vertical layout (#773) Co-authored-by: amojury --- README.md | 1 + lua/avante/config.lua | 1 + lua/avante/sidebar.lua | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e11a5747a..b58b0d88c 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,7 @@ _See [config.lua#L9](./lua/avante/config.lua) for the full config_ }, input = { prefix = "> ", + height = 8, -- Height of the input window in vertical layout }, edit = { border = "rounded", diff --git a/lua/avante/config.lua b/lua/avante/config.lua index c193eeecb..2d61112af 100644 --- a/lua/avante/config.lua +++ b/lua/avante/config.lua @@ -172,6 +172,7 @@ Respect and use existing conventions, libraries, etc that are already present in }, input = { prefix = "> ", + height = 8, -- Height of the input window in vertical layout }, edit = { border = "rounded", diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index d55d2ffce..06499ea62 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -1415,7 +1415,7 @@ function Sidebar:create_input(opts) local get_size = function() if self:get_layout() == "vertical" then return { - height = 8, + height = Config.windows.input.height, } end local selected_code_size = self:get_selected_code_size()