From 5d9fa1c36cc9e43a9d7cd65ddcc417128a9d41c3 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Mon, 28 Oct 2024 16:21:59 -0400 Subject: [PATCH] fix: snippet resolve --- lua/blink/cmp/sources/snippets/init.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/blink/cmp/sources/snippets/init.lua b/lua/blink/cmp/sources/snippets/init.lua index 3e096be1..5df8eede 100644 --- a/lua/blink/cmp/sources/snippets/init.lua +++ b/lua/blink/cmp/sources/snippets/init.lua @@ -46,13 +46,11 @@ function snippets:resolve(item, callback) local parsed_snippet = require('blink.cmp.sources.snippets.utils').safe_parse(item.insertText) local snippet = parsed_snippet and tostring(parsed_snippet) or item.insertText - -- TODO: ideally context is passed with the filetype - local documentation = '```' .. vim.bo.filetype .. '\n' .. snippet .. '\n```' .. '\n---\n' .. item.description - local resolved_item = vim.deepcopy(item) + resolved_item.detail = snippet resolved_item.documentation = { kind = 'markdown', - value = documentation, + value = item.description, } callback(resolved_item) end