Remove repeated suffix from TN suggestion
JoseConseco opened this issue · 1 comments
Hi. When I'm making corrections in code I'm often getting TN suggestions that have same ending as rest of line eg::
In above case first suggestion is ok [there is no suggested ):
suffix] but often I get only suggestions that ends same as the rest of line - so after autocomplete I have to remove the repeated ending. I contacted TN support, but they said the repeated suffix should be automatically gone when accepting the auto-suggestion, which is does not do.
I wonder is this something that compe-tabnine can handle - by removing those suggestions from suggestion list, or by removing repeated part after pressing ?
This is a tricky issue.
In general, nvim-compe does not support this (there are plans to add this in future releases: hrsh7th/nvim-compe#297
However, as TabNine has some support for this behaviour, it sometimes works.
See this line:
compe-tabnine/lua/compe_tabnine/init.lua
Line 169 in f6ace45
So, if TabNine supplies the relevant info, this plugin uses it. Otherwise, no luck.