Closed Parsifa1 closed 2 months ago
I have the same issue and for me it comes with actions from none-ls, where preview
is something like
{
syntax = "",
text = "Preview is not available for this action (command=NULL_LS_CODE_ACTION).\nThis is due to limitations of your language server (null-ls) implementation."
}
I have roughly fixed it locally with something like this:
if preview["text"] ~= nil then
lines = {}
for s in preview.text:gmatch("[^\r\n]+") do
table.insert(lines, s)
end
preview.lines = lines
else
preview = preview or { syntax = "", lines = { "preview not available" } }
end
I have roughly fixed it locally with something like this:
if preview["text"] ~= nil then lines = {} for s in preview.text:gmatch("[^\r\n]+") do table.insert(lines, s) end preview.lines = lines else preview = preview or { syntax = "", lines = { "preview not available" } } end
maybe you can make a pr!
Uh, sorry, I'll fix it right away; you don't have to give me a PR.
Fixed in #45. Please check it.
Thanks for your quick response!
Thanks a lot, unfortunately I did not have time to make a PR..
It seems something went wrong here...
when run
require("actions-preview").code_actions
, it occurs.