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.62k stars 177 forks source link

bug: attempt to index field icons (a boolean value) #581

Closed ebiscaia closed 1 month ago

ebiscaia commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.1

Operating system/version

Fedora 40

Describe the bug

Sometimes I receive the following message and can't go forward: `...share/nvim/lazy/trouble.nvim/lua/trouble/view/render.lua:136: attempt to index field 'icons' (a boolean value)

Steps To Reproduce

Run one the trouble commands

Expected Behavior

Show the trouble window with relevant data

coleYab commented 1 month ago

I also encounter the same mistake today and I was able to fix it by changing my setup command for trouble from

            require("trouble").setup({
                  icons=false
            })

to

            require("trouble").setup({
                   icons={}
            })

And that fix my problem

ebiscaia commented 1 month ago

That worked for me too. However, it seems like the problem is somehow in the defaults because I had nothing set previously.

Thanks for the help

folke commented 1 month ago

Just check the docs. icons=false is simply not a valid option...

ebiscaia commented 1 month ago

I don't know if you were talking to me, but I would like to illustrate my situation:

Hope that helps to understand my case.

Thanks

ebiscaia commented 1 month ago

Ok, I figured out. I had a file called in the plugin/after folder and that one had the config issue. I removed the icon option and everything is working properly