fix: correct minor typo in sidebar.lua (#172)

This commit is contained in:
Yusu Pan 2024-08-23 18:17:58 +08:00 committed by GitHub
parent a3c2a9a0d5
commit 7d4be712f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -123,7 +123,7 @@ local E = {}
---@private
E._once = false
--- intialize the environment variable for current neovim session.
--- initialize the environment variable for current neovim session.
--- This will only run once and spawn a UI for users to input the envvar.
---@param opts {refresh: boolean, provider: AvanteProviderFunctor}
---@private

View File

@ -81,13 +81,13 @@ function Sidebar:open()
local in_visual_mode = Utils.in_visual_mode() and self:in_code_win()
if not self:is_open() then
self:reset()
self:intialize()
self:initialize()
self:render()
else
if in_visual_mode then
self:close()
self:reset()
self:intialize()
self:initialize()
self:render()
return self
end
@ -878,7 +878,7 @@ end
--- Initialize the sidebar instance.
--- @return avante.Sidebar The Sidebar instance.
function Sidebar:intialize()
function Sidebar:initialize()
self.code.winid = api.nvim_get_current_win()
self.code.bufnr = api.nvim_get_current_buf()
self.code.selection = Utils.get_visual_selection_and_range()