-
Notifications
You must be signed in to change notification settings - Fork 0
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
quickfix theme not applied until list is opened again or an item is added #3
Comments
Hi, thanks! I'm afraid I can't replicate this behaviour. I haven't setup telescope on my setup, however I can look into the problem if you provide a minimal config that would produce this bug. |
to reproduce
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "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", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
-- add any other plugins here
{
"arsham/listish.nvim",
dependencies = {
"arsham/arshlib.nvim",
-- "nvim-treesitter/nvim-treesitter-textobjects",
},
ft = "qf",
opts = true,
},
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
keys = {
{ "<C-p>", "<cmd>lua require('telescope.builtin').live_grep()<cr>" },
},
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
this only happens when the qflist is lazy loaded with sorry it took a while to reply >_< |
Thank you for the code. I'm not sure what is happening with this setup, but I managed to make this work. -- Instead of opts = true add the config
-- opts = true,
ft = "qf",
config = function(_, opts)
require("listish").config(opts)
vim.fn.setqflist(vim.fn.getqflist())
end, |
ah strange. maybe it's not called in the config? |
It is not supposed to be called in the config. The snippet above is just a hack, to repopulate the list only once when the plugin is lazy loaded. |
how about, in the config, if the qflist is open, then repopulate the list? |
I'm not sure if I'm following. Can you elaborate please? |
the snippet above is a fix for when the plugin is lazy loaded when the qf first opens. if that happens, the fix could be placed inside of the plugin, when it loads. since it's only needed if the plugin is lazy loaded, one way to check this is if the qflist is open when the plugin loads, assume it was lazy loaded, and apply the fix |
Hi, nice plugin!
When I first open the quickfix window after populating it with some items, the styling and the column alignments aren't there. But after I close it and re-open it, or if I add an item to the list, the style and lining up gets applied.
I'm using telescope's live grep to add items to quickfix btw.
This is my config using lazy.nvim
The text was updated successfully, but these errors were encountered: