Skip to content

Commit

Permalink
Ensure item.detail is a string (#176)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
apgrc and pre-commit-ci[bot] authored Aug 25, 2024
1 parent 3cc6c6a commit c8ca2a3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/null-ls/builtins/completion/luasnip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ return h.make_builtin({
snip_id = snip.id,
show_condition = snip.show_condition,
}
local detail
if type(snip.detail) == "table" then
detail = table.concat(snip.detail, "\n")
else
detail = snip.detail
end
if not snip.hidden then
items[#items + 1] = {
word = snip.trigger,
label = snip.trigger,
detail = snip.description,
detail = detail,
kind = vim.lsp.protocol.CompletionItemKind.Snippet,
data = data,
documentation = {
Expand Down

0 comments on commit c8ca2a3

Please sign in to comment.