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

Default rank is to high

Open mattaschmann opened this issue 6 years ago • 7 comments

self.rank = 1000 is listed in the examples:

	class Source(Base):
	    def __init__(self, vim):
	        super().__init__(vim)
	        self.name = 'async'
	        self.mark = '[async]'
	        self.rank = 1000
	        self._count = 0

That is what is used for this plugin. However, the default is 100:

					*deoplete-source-attribute-rank*
rank		(Integer)			(Optional)
		Source priority.  Higher values imply higher priority.
		Note: It is high priority than match position.

		Default: 100

This puts tabnine above everything else. You can override this with:

call deoplete#custom#source('tabnine', 'rank', 50)

However, it would probably be preferable to use the default sort, as having tabnine above everything else, especially as it creates a lot of suggestions, can get cumbersome.

mattaschmann avatar Nov 09 '18 18:11 mattaschmann

I set the rank that high because it got annoying to be all the way below the LanguageClient suggestions. I'm open to discussion about what the "right" default rank would be.

tbodt avatar Nov 09 '18 19:11 tbodt

That makes sense, and like I mentioned, it's customizable. I found that having 8-10 tabnine suggestions above my ternJS ones was unusable. Maybe all you need is a helpfile that mentions how to customize the sort?

mattaschmann avatar Nov 09 '18 19:11 mattaschmann

when i use deoplete-jedi for python deoplete-go for go, the completion is much better than tabnine

JoveYu avatar Jun 12 '19 08:06 JoveYu

I also stumbled onto this problem here, though I'm actually not sure about the solution.

Especially in combination with the quite good deoplete-jedi I would want to see both.

Documentation on customization here could definitely help.

What I'll try and feels right is

  • a lower rank for tabnine (playing around with that one)
  • tweak max_candidates for each source and globally (see https://github.com/Shougo/deoplete.nvim/issues/731)

Perhaps a lower rank

syphar avatar Nov 27 '19 21:11 syphar

I guess there is still no solution? Which Vim client are you using for Tabnine in 2023? (although deoplete-tabnine really works great!)

dubst3pp4 avatar Jun 02 '23 08:06 dubst3pp4

You can use ddc.vim instead.

https://github.com/LumaKernel/ddc-tabnine

Shougo avatar Jun 02 '23 08:06 Shougo

Cmp-tabnine

tzachar avatar Jun 02 '23 18:06 tzachar