diff --git a/lua/null-ls/builtins/completion/luasnip.lua b/lua/null-ls/builtins/completion/luasnip.lua index 25270f7b..5497ea32 100644 --- a/lua/null-ls/builtins/completion/luasnip.lua +++ b/lua/null-ls/builtins/completion/luasnip.lua @@ -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 = {