chore(secrets): support table of string (#500)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2024-09-03 21:47:01 -04:00
committed by GitHub
parent b46eec2a84
commit d7d476ddf5
7 changed files with 83 additions and 116 deletions

View File

@@ -2,6 +2,7 @@ local Utils = require("avante.utils")
local Llm = require("avante.llm")
local Highlights = require("avante.highlights")
local Config = require("avante.config")
local Provider = require("avante.providers")
local api = vim.api
local fn = vim.fn
@@ -36,6 +37,10 @@ function Suggestion:new(id)
self._timer = nil
self._contexts = {}
if Config.behaviour.auto_suggestions then
if not vim.g.avante_login or vim.g.avante_login == false then
api.nvim_exec_autocmds("User", { pattern = Provider.env.REQUEST_LOGIN_PATTERN })
vim.g.avante_login = true
end
self:setup_mappings()
self:setup_autocmds()
end