From bca7bf948eaf06be46e35809325119d5203aa626 Mon Sep 17 00:00:00 2001 From: iguanacucumber Date: Mon, 21 Oct 2024 02:55:49 +0400 Subject: [PATCH] merged.md: Remove non implemented PR --- PRs/2001.patch | 35 ----------------------------------- merged.md | 3 +-- 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 PRs/2001.patch diff --git a/PRs/2001.patch b/PRs/2001.patch deleted file mode 100644 index b997f43..0000000 --- a/PRs/2001.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 5f8e04fdc76f3a9bc4acad09036d206ac18bc331 Mon Sep 17 00:00:00 2001 -From: ldfwbebp -Date: Sun, 28 Jul 2024 02:16:13 +1200 -Subject: [PATCH] feat(ghost_text): Added multi-line ghost_text support for - custom snippets of luasnip - ---- - lua/cmp/view/ghost_text_view.lua | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/lua/cmp/view/ghost_text_view.lua b/lua/cmp/view/ghost_text_view.lua -index 19c951359..c5f8b3e6e 100644 ---- a/lua/cmp/view/ghost_text_view.lua -+++ b/lua/cmp/view/ghost_text_view.lua -@@ -84,7 +84,19 @@ end - --- This function calculates the bytes of the entry to display calculating the number - --- of character differences instead of just byte difference. - ghost_text_view.text_gen = function(self, line, cursor_col) -- local word = self.entry:get_insert_text() -+ local word -+ local completion_kind = self.entry:get_kind() -+ local completion_item = self.entry:get_completion_item() -+ -- Check if completion_kind indicates a snippet -+ -- Handle custom snippet -+ if completion_kind == 15 and completion_item and completion_item.documentation and completion_item.documentation.value then -+ local doc_value = completion_item.documentation.value -+ local pattern = '```(.-)\n(.-)\n```' -+ _, word = doc_value:match(pattern) -+ else -+ -- Handle built-in snippet and non-snippet completion -+ word = self.entry:get_insert_text() -+ end - if self.entry:get_completion_item().insertTextFormat == types.lsp.InsertTextFormat.Snippet then - word = tostring(snippet.parse(word)) - end diff --git a/merged.md b/merged.md index 993f8cf..5dd1f70 100644 --- a/merged.md +++ b/merged.md @@ -28,9 +28,8 @@ ## Feat - @ feat: Refactor compare.scopes #2007 -- feat(ghost_text): Added custom multi-line snippets ghost_text support #2001 - feat: allow more completion highlight control #1972 -- @ Multiline snippet ghost text with dynamic window position flip #1955 +- @ Multiline snippet ghost text with dynamic window position flip #1955 - @ Allow comparators access to the complete list of entries #1894 - @ Add option to not reverse select_next_item on bottom_up list (#1346) #1711 - @ feat: add col_offset option for doc view #1528