Closed jthvai closed 3 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
Did you check docs and existing issues?
Neovim version (nvim -v)
0.9.5
Operating system/version
Arch Linux (up-to-date 2024-02-22)
Describe the bug
When
icons = true
in Trouble's config, but an icon is not available for a filetype/extension, the Trouble window will fail to open with:when there are diagnostics.
I believe this is because
gsub
is called here (text.lua L22) onstr
without anil
check, butget_icons
called here (renderer.lua L108) can still returnnil
as the ok check in its definition here (renderer L13) only checks whether devicons is installed, not if it can actually return an icon for the givenrequire("nvim-web-devicons").get_icon
.Steps To Reproduce
nvim -u repro.lua test.py
def:
only and exiting insert mode:TroubleToggle
)Expected Behavior
Ideally, Trouble should simply not render an icon for that file, like
icons = false
.Repro