feat: toggle sidebar_header (#737)
This commit is contained in:
parent
2c33a894bb
commit
134cf40096
@ -257,6 +257,7 @@ _See [config.lua#L9](./lua/avante/config.lua) for the full config_
|
|||||||
wrap = true, -- similar to vim.o.wrap
|
wrap = true, -- similar to vim.o.wrap
|
||||||
width = 30, -- default % based on available width
|
width = 30, -- default % based on available width
|
||||||
sidebar_header = {
|
sidebar_header = {
|
||||||
|
enabled = true, -- true, false to enable/disable the header
|
||||||
align = "center", -- left, center, right for title
|
align = "center", -- left, center, right for title
|
||||||
rounded = true,
|
rounded = true,
|
||||||
},
|
},
|
||||||
|
@ -166,6 +166,7 @@ Respect and use existing conventions, libraries, etc that are already present in
|
|||||||
width = 30, -- default % based on available width in vertical layout
|
width = 30, -- default % based on available width in vertical layout
|
||||||
height = 30, -- default % based on available height in horizontal layout
|
height = 30, -- default % based on available height in horizontal layout
|
||||||
sidebar_header = {
|
sidebar_header = {
|
||||||
|
enabled = true, -- true, false to enable/disable the header
|
||||||
align = "center", -- left, center, right for title
|
align = "center", -- left, center, right for title
|
||||||
rounded = true,
|
rounded = true,
|
||||||
},
|
},
|
||||||
|
@ -605,6 +605,8 @@ local base_win_options = {
|
|||||||
function Sidebar:render_header(winid, bufnr, header_text, hl, reverse_hl)
|
function Sidebar:render_header(winid, bufnr, header_text, hl, reverse_hl)
|
||||||
if not bufnr or not api.nvim_buf_is_valid(bufnr) then return end
|
if not bufnr or not api.nvim_buf_is_valid(bufnr) then return end
|
||||||
|
|
||||||
|
if not Config.windows.sidebar_header.enabled then return end
|
||||||
|
|
||||||
if not Config.windows.sidebar_header.rounded then header_text = " " .. header_text .. " " end
|
if not Config.windows.sidebar_header.rounded then header_text = " " .. header_text .. " " end
|
||||||
|
|
||||||
local winbar_text = "%#Normal#"
|
local winbar_text = "%#Normal#"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user