tzachar / cmp-tabnine

TabNine plugin for hrsh7th/nvim-cmp
MIT License
286 stars 27 forks source link

entry.completion_item.data.detail always returns empty value #88

Closed gonviegas closed 1 year ago

gonviegas commented 1 year ago

I used to have entry.completion_item.data.detail returning the prediction strength but now seems to be always empty.

I have show_prediction_strength = true and my cmp setup is the following:

if entry.source.name == "cmp_tabnine" then
    vim_item.kind = " " .. "" .. " "
    local detail = (entry.completion_item.data or {}).detail
    if detail and detail:find('.*%%.*') then
        vim_item.menu = '   ' .. detail
    else
        vim_item.menu = ' TabNine '
    end
end

This used to work... I don't know when this stopped working but in the meantime I switched to https://github.com/folke/lazy.nvim, but I don't know if it is related as the cmp_tabnine setup function seems to be working cause if I change some options there, they take effect.

tzachar commented 1 year ago

Not related. Its a value returned from the TabNine process, which does not always attach the percentages.

gonviegas commented 1 year ago

The thing that I find weird is that it used to constantly show the percentages and now they literally never appear. Probably something changed in Tabnine...