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
IntelliJ toggle TabNine result order to be before or after native autocomplete #18
Comments
Huge +1. Came here searching for this feature as I think it's probably the only thing that's stopping me from recommending TabNine to more people. Specifically though, I'd like the behavior here to be a bit more configurable. It would be nice to choose the order of completion sources generically, though that's maybe more a JetBrains thing. In terms of what TabNine can control, I would love to at least have a "show before/after other completions" option, and a keybinding that I can set/press when the completion popup is open to hide all TabNine suggestions for as long as that specific completion is open. |
Without fixing this it is just not usable. Tried it for the day on Typescript/WebStorm, there was barely a single first suggestion that made sense and they come on top of default (which is already very accurate for statically typed languages in IntelliJ). Not talking about 14 trial is ridiculous (even IntelliJ Ultimate itself has a 30 day trial) and the price is exorbitant even if it worked correctly (25% of the whole IntelliJ Ultimate price just for autocompletion which already works reasonable built-in, really?!) . For a new, not-there-yet service trying to acquire the market which is already filled with good IDE native implementations, it seems making too much barriers for itself. IMHO at the bare minimum it should fix issues like this instantly. |
I found a workaround that forces tab nine to come after the build in suggestions if you explicitly selected the build-in suggestion earlier.
The TabNine suggestions are still on top or preselected most of the time |
“I hate and love. And why, perhaps you’ll ask. Thanks for trying out Tabnine @fedorl , we highly appreciate any feedback coming from the community and value you taking the time to deliver it to us. Hopefully we will improve in the future.
Awesome hack @elovin ! We would love to hear back from you after you've accumulated some milage with the setup, to know whether this is a direction worth pointing other users to. |
@boaz-codota ancient roman poetry aside, by closing this, are you saying that toggling suggestion orders from TabNine as suggested in the original post will not be implemented ? |
"And enterprises of great pith and moment @boaz-codota with the above workaround, suggestions are still on top or native most of the time, so it is not clear what is awesome and why the ticket was closed. |
Yes, I would like to place TabNine's suggestions after those that were inferred from TypeScript. @boaz-codota Could you please reopen the issue? |
plugin-dev.com says public class FilteringCompletionContributor extends CompletionContributor {
@Override
public void fillCompletionVariants(@NotNull CompletionParameters parameters, @NotNull final CompletionResultSet resultSet) {
ArrayList<CompletionResult> elements = new ArrayList<>();
// collect the other completion-contributors results
resultSet.runRemainingContributors(parameters, elements::add);
List<Integer> filteredsordedResults = IntStream.range(0, elements.size())
.filter(i -> {
LookupElement tabnine_element = elements.get(i).getLookupElement();
if (tabnine_element.getObject() instanceof TabNineCompletion) {
String tabnine_autocompl = tabnine_element.getLookupString();
boolean already_in_other_contributers_results = elements.stream()
.filter(e -> !(e.getLookupElement().getObject() instanceof TabNineCompletion))
.anyMatch(e -> {
String another_autocompl = e.getLookupElement().getLookupString();
return another_autocompl.equals(tabnine_autocompl);
});
return !already_in_other_contributers_results;
} else {
return true;
}
})
.mapToObj(i -> (Integer) i) //WTF? I don't know how java works!
.sorted(Comparator.comparing(i -> {
boolean is_tabnine = elements.get(i).getLookupElement().getObject() instanceof TabNineCompletion;
return is_tabnine? i + 10000 :i; // if is tabnine should go to the very back! behind all others!
}))
.collect(Collectors.toList());
// add to resultSet
filteredsordedResults.forEach(i -> resultSet.passResult(elements.get(i)));;
}
} to make this work one actually needs to:
|
@dertilo Nice one! That should probably be togglable in the options because most users have probably got used to the current behaviour, and I bet @boaz-codota will merge that as soon as you open a PR! 😉 @elovin's suggestion is unfortunately not an adequate solution as it doesn't guarantee the order of the suggestions. |
Trying out TabNine on a recommendation. +1 to this thread - the extra autocompletion is great when IntelliJ doesn't have a suggestion, but actively makes the existing code-completion worse the rest of the time. Implementing the ability to have TabNine suggestions show after native ones would make this a much more useful tool. Disappointed that this got closed out based on a partial workaround - do we have any hope of seeing movement? |
Currently tabnine is useless it shows fields that doesnt exists variables that are not defined... |
@boaz-codota Can you please reopen this issue? If you're not going to, can you give us an explanation why? |
omg. I'm so happy this thread exists. It's so painful that Tabnine's ego is so overwhelming that it has determined that its suggestions should always be at the top of the list. The time I'm saving with Tabnine is completely wasted by having to cursor down through the code completion hints so that I can get to the natively suggested recommendations, which I prefer because:
|
Hi @andychute, we have released an experimental "inline Completions" feature 🎉 Please share your experience with this feature here 🙏 In order to enable it:
|
@dimacodota That's good, but having an option to prioritize IDE autocomplete over TabNine without using inline completions would be better. |
Actually I stopped using tabnine today because of it |
me too. until this issue is fixed. |
I really like TabNine. I listened to your episode on The Changelog Podcast and am a big fan of your philosophy. Unfortunately, not being able to put TabNine suggestions after language-based completions is a deal-breaker for me :( |
This is also painful for languages like Elixir where tabnine is pretty great with it. I am trying tabnine as a paid member for a month, which I won't be renewing due to this issue. The cost would be worth it for me when this is fixed. |
FIY, another code completion product that was released just recently by a popular Git hosting service doesn't have this problem. |
It's two years later and I have the same issue which led me here :). @elovin's suggestion helps, but as noted, it's only partial. @dimacodota is there any chance of an update on this? Is it somehow different for Pro users? Do Jetbrain users really prefer Tabnine completions before Jetbrain's? |
@dimacodota This is the single biggest issue stopping me from sticking with tabnine, I test ran it for a month now and would keep it, but it's interfering with the DX of standard typescript autocomplete, inline suggestions can also be a bit distracting. Please if you can do something about this, I would be so grateful. |
why this issue closed? |
Having the same issue. Working on VS code and TabNine suggests dictionary key that don't exist; the native suggestions are sometimes more accurate. Would be great to be able to toggle between the two. |
I'm also disabling tabnine because of this |
Hi @elovin, please, can you elaborate on what you mean by this?
I enabled machine learning order, and it seems to work for java code, but not in xml files. Perhaps that workaround doesn't wokr for xml? |
Been beta testing TabNine for a while and this is the summary of my experience so far.
The codebase is GraphQL server, a React Frontend, a AWS CDK application and some MD and SQL.
In cases where there are no "native" suggestions, TabNine adds tremendous value.
But to me there is a big difference in how positive and accurate TabNine completions over native IntelliJ symbol suggestions from the indexed-based autocompletion engine they have. The IntelliJ symbol is in a very large majority of cases more relevant when working directly on Types with symbols. So much so that TabNine feels like a nuisance since it's never more accurate, and often fills the result list with suggestions that are redundant.
So my feature request as such is:
Add a setting to keep IntelliJ native symbol suggestions, if they exist, above the TabNine suggestions, as an alternative to having TabNine always on top. This way, you can have the best of both worlds.
Disable TabNine suggestions from "Smart Type" completions. Intellij has two completion modes, "Basic" and "Smart Type", which can be triggered with different key combinations:
As a developer, if I trigger the context-based SmartType completion, I want that context-based Type completion over anything else.
Here it's suggesting strings that dont exist on the type at all.
Here I want to access
secret
but the TabNine completion is in the way, disallowing me from completing automatically and forcing list navigation.The text was updated successfully, but these errors were encountered: