Skip to content

Commit

Permalink
fix(lua): lua's handling of error being sent as {} counted as true.. …
Browse files Browse the repository at this point in the history
…*sigh*
  • Loading branch information
Will Ehrendreich authored and Will Ehrendreich committed Nov 7, 2023
1 parent 66f01bd commit 2d47ce2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lua/ionide/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ end

--see: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentHighlight
M["textDocument/documentHighlight"] = function(error, result, context, config)
if not error then
if result then
vim.lsp.handlers["textDocument/documentHighlight"](error, result, context, config)
end
end
Expand All @@ -680,11 +680,9 @@ M["textDocument/hover"] = function(error, result, context, config)
-- .. "result is: \n"
-- .. vim.inspect({ error or "", result or "", context or "", config or "" })
-- )
if not error then
if result then
if result.content then
vim.lsp.handlers.hover(error or {}, result.content.message or {}, context or {}, config or {})
end
if result then
if result.content then
vim.lsp.handlers.hover(error or {}, result.content.message or {}, context or {}, config or {})
end
end
-- vim.lsp.handlers.hover(error or {}, result or {}, context or {}, config or {})
Expand Down

0 comments on commit 2d47ce2

Please sign in to comment.