-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: error when adding qf entries from telescope / :vim
#8
Conversation
Hmmm...this could only happen if the quickfix rendered a line without the proper separators. I'd like to dig in more and try to find the root cause, because I think this quick fix will be insufficient if that's actually what's going on. What does your config look like? Are you lazy loading at all? Could you possibly find a consistent repro so I can check it on my machine? |
Fairly certain now why it happens, and it comes in tandem with #9 So first, I trigger the #9 bug. I then close the qflist. I try to fill it again via something like So at least in theory this bug shouldn't be your responsibility either; I'll see if changing up guessindent will fix both issues. |
#9 got mostly fixed, but this, turns out, is indeed different, and isn't related to guessindent (I disabled it to test) Repro:
|
This is my plugin configuration: {
'stevearc/quicker.nvim',
-- lazy = true,
---@module "quicker"
---@type quicker.SetupOptions
opts = {
keys = {
{
'>',
function() require('quicker').expand({ add_to_existing = true }) end,
desc = 'Expand quickfix context',
},
{
'<',
function() require('quicker').collapse() end,
desc = 'Collapse quickfix context',
},
},
},
}, I removed |
I'm still not able to reproduce the issue. Could you try with a minimal config like the one below -- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
{
"stevearc/quicker.nvim",
---@module "quicker"
---@type quicker.SetupOptions
opts = {},
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here And, if possible, come up with a file you can source to get a repro, something like vim.cmd("vim ;function; %")
vim.cmd("copen")
vim.defer_fn(function()
vim.cmd("cclose")
vim.defer_fn(function()
vim.cmd("vim ;target; %")
end, 1000)
end, 1000) |
You mention
Thank you for your patience and good suggestions for how to repro better, I wouldn't arrive at this without you I don't think. |
Great, I think I've found the root cause and fixed it in a more graceful way. Can you try out the latest version and LMK if you still have the issue? |
omg it works!! thank you so much :D |
Truthfully I have no clue why this error happened and what it implies, but defaulting to zero worked and doesn't seem to give me any issues anymore.
I tried removing my change just now to re-get the error, and yet the bug didn't happen again.