feat: tab switching behaviour (#155)

* feat: tab switching behaviour

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* revert: features

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

---------

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-22 12:48:20 -04:00 committed by GitHub
parent 2e75a10556
commit ed5057448c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -75,7 +75,9 @@ M.defaults = {
---Specify the behaviour of avante.nvim
---1. auto_apply_diff_after_generation: Whether to automatically apply diff after LLM response.
--- This would simulate similar behaviour to cursor. Default to false.
---2. cycle_between_open_buffers : Enable tab cycling between windows. Default to true
behaviour = {
cycle_between_open_buffers = true,
auto_apply_diff_after_generation = false,
},
highlights = {

View File

@ -736,6 +736,9 @@ function Sidebar:refresh_winids()
if self.winids.input then
table.insert(winids, self.winids.input)
end
if Config.behaviour.cycle_between_open_buffers and self.code.winid then
table.insert(winids, self.code.winid)
end
local function switch_windows()
local current_winid = api.nvim_get_current_win()