cmp-tabnine icon indicating copy to clipboard operation
cmp-tabnine copied to clipboard

entry.completion_item.data is nil

Open mortemn opened this issue 3 years ago • 1 comments

I'm using Packer with Tabnine. However, after I installed the plugin, run ./install.sh and added some configuration, it seems like entry.completion_item.data always returns nil. Here is a snippet of my formatting: formatting = { format = function(entry, vim_item) vim_item.kind = lspkind.presets.default[vim_item.kind] local menu = source_mapping[entry.source.name] if entry.source.name == "cmp_tabnine" then if entry.completion_item.data ~= nil and entry.completion_item.data.detail ~= nil then menu = entry.completion_item.data.detail .. " " .. menu else menu = "nil " ..menu end vim_item.kind = "" end vim_item.menu = menu return vim_item end, }, environment: Mac OS Monterey Version 12.3 Apple M1

mortemn avatar Jul 29 '22 04:07 mortemn

This does not make sense. enrty.data is always set. details might be nil though. In any event, I don't really understand what is the issue here. Please either give a stack trace if there is an error or something which indicated the problem.

tzachar avatar Jul 31 '22 05:07 tzachar