fix(trouble-nvim): fix crash when lspkind is unaccessible#1751
Conversation
Review ChecklistDoes this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist: Proper conventional commit scoping:
|
|
Wait Im not following whats happening here. |
|
@Uzaaft apologize if my previous description was unclear, as English is not my native language. :lua local lspkind_avail, lspkind = pcall(require, "lspkind"); local kinds = lspkind_avail and lspkind.symbol_map; vim.print(kinds)When the lspkind plugin is not installed, the expression local icon = ctx.opts.icons.kinds[ctx.item.kind]Here, a table is expected, so passing a boolean causes a crash. This issue can be easily reproduced with a minimal configuration: |
📑 Description
Trouble's LSP-related commands crash when lspkind.nvim is unavailable, because kinds is passed a boolean while a table is expected.
📖 Additional Information