folke / trouble.nvim

🚦 A pretty diagnostics, references, telescope results, quickfix and location list to help you solve all the trouble your code is causing.
Apache License 2.0
5.24k stars 178 forks source link

bug: icons not showing and duplicate windows possible #341

Closed Joywatchin closed 4 months ago

Joywatchin commented 9 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.9.2

Operating system/version

Macos 14.0

Describe the bug

When I try and open Trouble, I run into a problem of having an icon-less diagnostics window. Then, if I try and toggle Trouble again, the correct window pops up below the faulty initial window.

help

Steps To Reproduce

  1. Installed on nvchad using a custom plugins file as shown below image
  2. Added a keybind to the custom init file (from the docs) image
  3. Go to a python project with errors and press space then q
  4. Press space then q again

https://github.com/folke/trouble.nvim/assets/67507794/b47128bf-088d-4097-8b9a-08575a266dc3

Expected Behavior

It should open the diagnostic window WITH icons and be able to close with the same key (space and q)

Repro

-- 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",
  "folke/trouble.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
folke commented 4 months ago

Development on the main branch is EOL.

Trouble has been rewritten and will be merged in main soon.

This issue/feature either no longer exists or has been implemented on dev.

For more info, see https://github.com/folke/trouble.nvim/tree/dev