From 2cce901332381d8a01ac83cda70c0e78d229bd1d Mon Sep 17 00:00:00 2001 From: Andy Teijelo Date: Fri, 23 Sep 2022 13:14:21 -0400 Subject: [PATCH] fix the completion menu issue --- lua/completion.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/completion.lua b/lua/completion.lua index 7cfbf9c..91ceb5f 100644 --- a/lua/completion.lua +++ b/lua/completion.lua @@ -53,7 +53,9 @@ cmp.setup({ format = function(entry, vim_item) vim_item.abbr = string.sub(vim_item.abbr, 1, 20) vim_item.kind = string.sub(vim_item.kind, 1, 10) - -- vim_item.menu = string.sub(vim_item.menu, 1, 10) + if vim_item.menu then + vim_item.menu = string.sub(vim_item.menu, 1, 10) + end return vim_item end }