Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of suggestion #70

Closed
Immugio opened this issue Feb 3, 2020 · 27 comments
Closed

Order of suggestion #70

Immugio opened this issue Feb 3, 2020 · 27 comments
Labels
Type: enhancement New feature or request wontfix

Comments

@Immugio
Copy link

Immugio commented Feb 3, 2020

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.

@dimacodota dimacodota added the Type: enhancement New feature or request label Mar 14, 2020
@anderson-custodio
Copy link

It would be really great!

@avichay77
Copy link
Contributor

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

@Immugio
Copy link
Author

Immugio commented Aug 31, 2020

@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.

@marian2js
Copy link

@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)

@rcoundon
Copy link

rcoundon commented Mar 2, 2021

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.

@marian2js
Copy link

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.

@sergei-dyshel
Copy link

sergei-dyshel commented Mar 14, 2021

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 sergei-dyshel/vscode@2357e41.
  • 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 #6.

@vegerot
Copy link

vegerot commented Mar 16, 2021

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

@sergei-dyshel
Copy link

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

@vegerot
Copy link

vegerot commented Mar 17, 2021

@sergei-dyshel FeelsBadMan

@dipakparmar
Copy link

Any update on this?

@kanimaru
Copy link

kanimaru commented Jul 7, 2021

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

@DanteMarshal
Copy link

DanteMarshal commented Jul 20, 2021

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.

@krailler
Copy link

I have the same issue here using typescript

@dimacodota
Copy link
Contributor

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

@carlosrigoni
Copy link

i am stopping use tabnine for this reason

@dimacodota
Copy link
Contributor

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

@eliezedeck
Copy link

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.

@vegerot
Copy link

vegerot commented Oct 6, 2021

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

@eliezedeck
Copy link

... and I just stopped my Pro subscription.

@lorenzo-w
Copy link

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.

@eliezedeck
Copy link

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.

@sergei-dyshel
Copy link

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

@vegerot
Copy link

vegerot commented Jul 29, 2022

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

@sergei-dyshel
Copy link

@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.

@andrei-zgirvaci
Copy link

andrei-zgirvaci commented Sep 14, 2022

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

@stale
Copy link

stale bot commented Nov 14, 2022

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 stale bot added the wontfix label Nov 14, 2022
@stale stale bot closed this as completed Nov 21, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: enhancement New feature or request wontfix
Projects
None yet
Development

No branches or pull requests