From c64d40af2a694438ff5af69cff7c1b1ad29a1f96 Mon Sep 17 00:00:00 2001 From: aklk1ng <2628084745@qq.com> Date: Thu, 1 Feb 2024 17:35:38 +0800 Subject: [PATCH] fix: when snippet's body is not a single-lin string --- lua/epo/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/epo/init.lua b/lua/epo/init.lua index 9a6b740..391c45a 100644 --- a/lua/epo/init.lua +++ b/lua/epo/init.lua @@ -323,7 +323,7 @@ local function extend_snippets(ft) for k, v in pairs(t) do local e = { label = k, - insertText = v.body[1], + insertText = type(v.body) == 'string' and v.body or table.concat(v.body, '\n'), kind = 15, insertTextFormat = 2, }