-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Failure to ensure no snippet overlap #978
Comments
Hey @ZacJMagee would you be able to share the LLM output too? It would be helpful to see to diagnose the issue. It would also be helpful to see the source files if that's possible. |
Hey @brewinski Here is my input and the LLM output. I was just trying to have it write me a .gitingore when I found this issue. I have since been able to get it to work but I am not sure how. It seems that the output itself was the issue. In the screenshot you can see that the output that was giving me the error was not formatted or displayed correctly. Output that was giving me the error. Output from the LLM that gave me the error.
I'll create a comprehensive .gitignore file for Python projects that includes Google token files. I'll create a new file: Filepath: .gitignore
This .gitignore file includes:
If your Google token file has a different name pattern, let me know and I can add it to the list. |
Thanks @ZacJMagee that's very helpful. I think I was able to find and fix the rendering issue and the apply issue. The rendering problem was a file type / language detection issue for files that weren't part of the sidebar context. The issue applying the changes to new files was a result of trying to make sure the llm hadn't suggested changes to overlapping line numbers. I've raised the PR that should hopefully solve this issue. #991. If you get a change to test the change-set, let me know if it resolves your issue. |
Glad I could help, I have not been able to replicate the bug since! |
Describe the bug
When trying to use a or A to apply the code from the plugin I keep getting this error.
Error 12:33:02 AM notify.error Avante Failed to ensure snippets no overlap
I am just running the default configuration.
EDIT
I have also tried removing all my snippets engines and the same error appears.
Luasnip
Friendly snippets.
This is my first report, please correct me if I have missed anything.
To reproduce
{
"yetone/avante.nvim",
event = "VeryLazy",
lazy = false,
version = false, -- set this if you want to always pull the latest change
opts = {
-- 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 windows
dependencies = {
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
-- "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
-- "zbirenbaum/copilot.lua", -- for providers='copilot'
{
-- support for image pasting
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- recommended settings
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
-- required for Windows users
use_absolute_path = true,
},
},
},
{
-- Make sure to set this up properly if you have lazy=true
'MeanderingProgrammer/render-markdown.nvim',
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
}
Expected behavior
The default keybind should apply the code to the buffer.
Installation method
Use lazy.nvim:
Environment
at 19:36:37 ➜ nvim -v
NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info
Repro
The text was updated successfully, but these errors were encountered: