fix(env): make sure to popup on nofile (fixes #211) (#212)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-25 11:29:55 -04:00 committed by GitHub
parent 28fd18fd0f
commit eaa373a7f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 8 deletions

View File

@ -96,8 +96,6 @@ M.stream = function(question, code_lang, code_content, selected_content_content,
---@type AvanteCurlOutput
local spec = Provider.parse_curl_args(Provider, code_opts)
Utils.debug({ spec })
---@param line string
local function parse_stream_data(line)
local event = line:match("^event: (.+)$")

View File

@ -150,7 +150,6 @@ E.setup = function(opts)
local function mount_dressing_buffer()
vim.defer_fn(function()
-- only mount if given buffer is not of buftype ministarter, dashboard, alpha, qf
local exclude_buftypes = { "qf", "nofile" }
local exclude_filetypes = {
"NvimTree",
"Outline",
@ -163,12 +162,9 @@ E.setup = function(opts)
"gitcommit",
"gitrebase",
"DressingInput",
"noice",
}
if
not vim.tbl_contains(exclude_buftypes, vim.bo.buftype)
and not vim.tbl_contains(exclude_filetypes, vim.bo.filetype)
and not opts.provider.has()
then
if not vim.tbl_contains(exclude_filetypes, vim.bo.filetype) and not opts.provider.has() then
Dressing.initialize_input_buffer({
opts = { prompt = "Enter " .. var .. ": " },
on_confirm = on_confirm,