You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the default configuration with Avante, I can open the sidebar and start chatting. However sometimes when trying to apply suggestions I get this error:
E5108: Error executing lua: ...al/share/nvim/lazy/avante.nvim/lua/avante/utils/init.lua:452: attempt to index local 'code' (a nil value)
stack traceback:
...al/share/nvim/lazy/avante.nvim/lua/avante/utils/init.lua:452: in function 'remove_indentation'
...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:382: in function 'ensure_snippets_no_overlap'
...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:494: in function 'apply'
...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:690: in function <...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:690>
To reproduce
Opened a .go file
aa
Ask to do anything with the file
Apply the suggestion
However the behavior is inconsistent, I haven't figured out how to replicate this reliably.
Expected behavior
The suggestion should be applied without creating an error 100% of the times
Installation method
Use lazy.nvim:
{
"yetone/avante.nvim",
event="VeryLazy",
lazy=false,
version=false, -- set this if you want to always pull the latest changeopts= {
-- add any opts here
},
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`build="make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windowsdependencies= {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
},
}
Environment
NVIM v0.10.2
Build type: RelWithDebInfo
LuaJIT 2.1.1725453128
Linux budapest 6.11.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 04 Oct 2024 21:51:11 +0000 x86_64 GNU/Linux
Repro
vim.env.LAZY_STDPATH=".repro"load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec= {
-- add any other plugins here
},
})
The text was updated successfully, but these errors were encountered:
Describe the bug
I have the default configuration with Avante, I can open the sidebar and start chatting. However sometimes when trying to apply suggestions I get this error:
To reproduce
.go
fileHowever the behavior is inconsistent, I haven't figured out how to replicate this reliably.
Expected behavior
The suggestion should be applied without creating an error 100% of the times
Installation method
Use lazy.nvim:
Environment
NVIM v0.10.2
Build type: RelWithDebInfo
LuaJIT 2.1.1725453128
Linux budapest 6.11.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 04 Oct 2024 21:51:11 +0000 x86_64 GNU/Linux
Repro
The text was updated successfully, but these errors were encountered: