Closed mortemn closed 2 years ago
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.
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