Closed ashton 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
Hey, hello, I was using Trouble with rescript-language-server and I was having issues using lsp provider, it wasn't working, so when I debbuged the issue I found that rescript-language-server was responding the follow to the
lsp_buf_request
function:And in here the evaluation of
#result == 0
is true, because the length operator works differently if the table has not an array part: https://stackoverflow.com/a/23591039So it understands that there is no result at all, but in fact it is just not formatted right.
So I added a
vim.tbl_isempty
inside each test in order to check if it's indeed has no result or if it just don't have and array part in the table.This fixed the issue for me.
PS: Also, if you check this same case comparing the behavior of
vim.lsp.buf.definition()
it works normally.