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

Order of suggestion

Open Immugio opened this issue 5 years ago • 26 comments

Is there any way to control the order of suggestions? At the moment the plugin puts the suggestions produced by TabNine at the beginning of the list. I'd prefer to have them at the end since often they are less relevant than suggestions that come e.g. from properties of an object.

Immugio avatar Feb 03 '20 13:02 Immugio

It would be really great!

anderson-custodio avatar May 29 '20 21:05 anderson-custodio

@Immugio @anderson-custodio, all: can you share specific examples (language, screenshots) where TabNine suggestions on top are not optimal?

avichay77 avatar Aug 31 '20 09:08 avichay77

@avichay77 the TabNine order of suggestion on its own is great. But I'd like all suggestion produced by TabNine to go below suggestion produced by other features of VS code.

E.g. I'd like all TypeScript generated suggestions first as they are context specific. And then all TabNine suggestions to follow after that as they are more generic and don't understand the context in which they are being used.

This issue is a blocker for me. I had to stop using this otherwise great plugin due to that.

Immugio avatar Aug 31 '20 09:08 Immugio

@avichay77 here is an example of this issue with TypeScript.

I'm returning a known type in which the only accepted key starting with o is outputs.

If I'd select operation which is the first suggestion, I'd get this ts error:

Type '{ operations: any; }' is not assignable to type 'RunResponse'.
  Object literal may only specify known properties, and 'operations' does not exist in type 'RunResponse'.ts(2322)

marian2js avatar Nov 13 '20 23:11 marian2js

Agreed, this is a bit of a dealkiller for me. When using TypeScript, the IDE autosuggestions for properties within the object I'm working are more relevant and accurate than Tabnine's suggestions and so I need them to appear first in the list.

rcoundon avatar Mar 02 '21 10:03 rcoundon

I worked around the issue by limiting Tabnine's suggestions to 3. Still, they appear first, but at least I never entirely lose the IDE's suggestions.

marian2js avatar Mar 02 '21 11:03 marian2js

I studied this problem a bit some time ago and came to conclusion that it's impossible to do this ordering just by tweaking the plugin code as VSCode orders completions mostly by score which is calculated based on completion text and not hints that completion plugins give him (e.g. sortText).

Since I didn't want to give up on Tabnine (the idea of powering auto-completion with AI is really ingenious) I decided to invest into tweaking VSCode source code. This led to 2 forks:

  • Fork of VSCode that manipulates VSCode internal completion scoring mechanism to put Tabnine completion in the top/bottom of the list (configurable). The fork has other unrelated tweaks, for Tabnine changes are contained in https://github.com/sergei-dyshel/vscode/commit/2357e417afa24c3be156c8053289c12b797c1ffd.
  • Fork of Tabnine plugin which adds some configuration options for fine-grained control of how plugin works per-language or per-workspace and also makes VSCode tweak work.

Unfortunately because of VSCode source change this solution is unlikely to be merged so I'm posting it only for completion geeks and vscode hackers like me :)

There is some history of this change in https://github.com/codota/tabnine-vscode/issues/6.

sergei-dyshel avatar Mar 14 '21 21:03 sergei-dyshel

@sergei-dyshel do you have any plans to open PRs for these?

vegerot avatar Mar 16 '21 19:03 vegerot

@vegerot No. As I said, my solution is a hack.

sergei-dyshel avatar Mar 16 '21 21:03 sergei-dyshel

@sergei-dyshel FeelsBadMan

vegerot avatar Mar 17 '21 14:03 vegerot

Any update on this?

dipakparmar avatar Jun 27 '21 05:06 dipakparmar

Removed this awesome plugin cause the suggestion order is annoying. To bad I like the some of the suggestions.

kanimaru avatar Jul 07 '21 08:07 kanimaru

I'm thinking of removing Tabnine too. Tabnine is supposed to help developers waste less time, while without this feature it actually wastes more time to pay attention to all the suggestions, scroll down and find the most relevant one. If there's any plan for this feature (which doesn't seem likely) tell people here so at least we won't remove the plugin until the feature is developed.

DanteMarshal avatar Jul 20 '21 08:07 DanteMarshal

I have the same issue here using typescript

krailler avatar Jul 20 '21 18:07 krailler

Hey all, we are working on a solution for this, it will be released to beta in our upcoming release, stay tuned

dimacodota avatar Jul 20 '21 18:07 dimacodota

i am stopping use tabnine for this reason

carlosrigoni avatar Aug 05 '21 00:08 carlosrigoni

Hi All, we just released an experimental "inline Completions" feature 🎉

Please share your experience with this feature here 🙏

In order to enable it:

  • make sure you are using the latest engine(3.5.37) and extension(3.4.21) version.
  • open the Tabnine Home, scroll to "General Preferences" and check the "inline Completions" option
  • restart vscode
Screen Shot 2021-08-08 at 11 15 14

dimacodota avatar Aug 08 '21 08:08 dimacodota

I use Vim extension and this "Inline completions" is really experimental... pretty much useless.

We really need the ability to move down the tabnine completion with an order we can specify, like only start at the 2nd or 3rd line if there are other VSCode suggestions. We badly need this to the point I would stop my Pro subscription until this is resolved.

eliezedeck avatar Oct 06 '21 12:10 eliezedeck

We really need the ability to move down the tabnine completion with an order we can specify, like only start at the 2nd or 3rd line if there are other VSCode suggestions. We badly need this to the point I would stop my Pro subscription until this is resolved.

💯% agree

vegerot avatar Oct 06 '21 15:10 vegerot

... and I just stopped my Pro subscription.

eliezedeck avatar Oct 06 '21 18:10 eliezedeck

Just tried tabnine after someone recommended it to me, yet the average quality of the suggestions I receive now is lower than before, as tabnine displaces all the (usually far more relevant) MyPy Typing suggestions in Python as well -> removing it.

lorenzo-w avatar Feb 25 '22 13:02 lorenzo-w

Anybody can tell me, is this resolved yet? I don't want to burn money just to try if it's now possible to set the order of suggestions.

eliezedeck avatar Jul 07 '22 13:07 eliezedeck

As I mentioned earlier in https://github.com/codota/tabnine-vscode/issues/70#issuecomment-798981147, this problem is not fixable without modifying vscode's code itself.

sergei-dyshel avatar Jul 17 '22 12:07 sergei-dyshel

@sergei-dyshel Is anybody on the Codota team (or other contributors) willing to contribute this to VSCode, then?

vegerot avatar Jul 29 '22 17:07 vegerot

@sergei-dyshel Is anybody on the Codota team (or other contributors) willing to contribute this to VSCode, then?

I'm not aware of such attempts, but can't speak for Codota team, as I'm not related to them.

sergei-dyshel avatar Aug 03 '22 09:08 sergei-dyshel

As I mentioned earlier in #70 (comment), this problem is not fixable without modifying vscode's code itself.

Emmet has a similar feature and it seems they manage to solve it by showing suggestions as snippets. Then, they just change the snippets order to top from vscode: "editor.snippetSuggestions": "top".

Maybe it's worth looking into it? https://code.visualstudio.com/docs/editor/emmet#_emmet-suggestion-ordering

andrei-zgirvaci avatar Sep 14 '22 11:09 andrei-zgirvaci

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 14 '22 01:11 stale[bot]