codota / TabNine

AI Code Completions
https://tabnine.com
MIT License
10.57k stars 492 forks source link

Inline completions - user feedback #432

Closed dimacodota closed 1 year ago

dimacodota commented 3 years ago

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

Please share your experience with this feature🙏

In order to enable it:

Screen Shot 2021-08-08 at 11 15 14
rcoundon commented 3 years ago

I'm possibly being dumb here but where is Tabnine Home? I can only see the regular VSCode preferences and I don't seem to be able to find anywhere to download the Tabnine engine separately (i.e. only the various extensions) which is what's implied by the instructions.

dimacodota commented 3 years ago

I'm possibly being dumb here but where is Tabnine Home? I can only see the regular VSCode preferences and I don't seem to be able to find anywhere to download the Tabnine engine separately (i.e. only the various extensions) which is what's implied by the instructions.

click on the "Tabnine" status bar item:

Screen Shot 2021-08-08 at 12 07 15
rcoundon commented 3 years ago

I'm possibly being dumb here but where is Tabnine Home? I can only see the regular VSCode preferences and I don't seem to be able to find anywhere to download the Tabnine engine separately (i.e. only the various extensions) which is what's implied by the instructions.

click on the "Tabnine" status bar item:

Screen Shot 2021-08-08 at 12 07 15

Great - thank you

dreambit commented 3 years ago

Does it allow to see one suggestion only?

dimacodota commented 3 years ago

Does it allow to see one suggestion only? you can "list" through the suggestions via alt +[ and alt +] keys

Screen Shot 2021-08-12 at 0 53 11
StefnirKristjansson commented 3 years ago

I honestly find it better than the popup since I have a lot of snippets that I use the tab space I didn't like the fact that the suggestions crowded out the snippets.

What would be perfect is that I could see the other suggestions somewhere so it don't waste time I circling them with the alt +[

Since I used tabnine to be faster I would like to see it fast if there are any suggestions that I can use.

xusine commented 3 years ago

When using lens-related plugins like Error lens and Git lens, it breaks Tabnine's autocomplete.

HippieHosenHustler commented 3 years ago

Looks like a cool feature. It does not seem to work in the IntelliJ Plugin though. Is this something that is in the works?

Eransho commented 3 years ago

Looks like a cool feature. It does not seem to work in the IntelliJ Plugin though. Is this something that is in the works?

Yes, we are working on it. It should be released soon

DenysAshikhin commented 3 years ago

Love this feature when combined with the Full Line completions. However, I have two requests/questions:

1) Would it be possible to add a switch (or be default) that if we have full line completion turned on, it will instead show its longest prediction first. I just find myself sometimes having to use the 'ctr + [ OR ]' to cycle from completing the current word (which is accurate) to the full line which is a bit cumbersome

2) Somehow combine inline with a dropdown? Like it would show the first auto-complete suggestion inline, but all other options would appear in a dropdown (either the current drop down style, or a different one).

2 is key because it shows whether I will waste time cyclying through each one with the hot keys or not.

Other than that, great work!

IRediTOTO commented 3 years ago

love this feature :)

laundmo commented 3 years ago

In VSCode the suggestion sometimes appears in front of the text. Seems to only happen when starting a new line. fixes itself after waiting for a bit

this might be caused by the fact that the files im working on are on a remote network drive and therefore have limited bandwith and latency, though tabnine really shouldn't need direct file access for individual predictions.

edit: hmm, also happens with lines when you add closing symbols and then jump before them, so it might not be related to it being a new line

edit 2: this is happening all the time now. im going to have to turn this great feature off until it stops moving my cursor due to suggestions popping up infront of the cursor, as that is really jarring. it should NEVER move my cursor no matter for how short, which it currently does, see the videos:

stopped typing, you can see the cursor move forwards and back:

https://user-images.githubusercontent.com/24855949/130456033-c6594e5a-2fa7-4e34-8fb4-0907a2a10a97.mp4

didn't stop typing:

https://user-images.githubusercontent.com/24855949/130455413-d3f55436-5d41-43e8-be57-46a1066b65ca.mp4

shmkane commented 3 years ago

There's occasions where pressing Tab to accept an inline-completion results in either an actual tab being inserted, or it prefers the first option of a dropdown Intellisense suggestion instead.

To prevent the latter, I've completely disabled the dropdowns from VSCode entirely.

However, in this .md file for example, the issue still persists

https://user-images.githubusercontent.com/2586027/130464528-21d5733a-ab00-4035-a3e1-a0d86136a429.mov

Settings: image image

dimacodota commented 3 years ago

There's occasions where pressing Tab to accept an inline-completion results in either an actual tab being inserted, or it prefers the first option of a dropdown Intellisense suggestion instead.

To prevent the latter, I've completely disabled the dropdowns from VSCode entirely.

However, in this .md file for example, the issue still persists

Screen.Recording.2021-08-23.at.10.26.24.AM.mov Settings: image image

@shmkane, can you please share your console log (Help -> Toggle Developer Tools) ?

shmkane commented 3 years ago

There's occasions where pressing Tab to accept an inline-completion results in either an actual tab being inserted, or it prefers the first option of a dropdown Intellisense suggestion instead. To prevent the latter, I've completely disabled the dropdowns from VSCode entirely. However, in this .md file for example, the issue still persists Screen.Recording.2021-08-23.at.10.26.24.AM.mov Settings: image image

@shmkane, can you please share your console log (Help -> Toggle Developer Tools) ?

Here's me attempting to tab complete on a markdown file vs a javascript file.

https://user-images.githubusercontent.com/2586027/130484757-fd01a9c4-f04d-4802-b0c2-0873b9044a5a.mov

I'm unsure if the errors displayed are related, but here's a PasteBin of the output shown in the video

dimacodota commented 3 years ago

@shmkane - can you please share the list of your installed extensions code --list-extensions?

shmkane commented 3 years ago

@shmkane - can you please share the list of your installed extensions code --list-extensions?

code --list-extensions

christian-kohler.npm-intellisense
christian-kohler.path-intellisense
CoenraadS.bracket-pair-colorizer-2
dbaeumer.vscode-eslint
discountry.react-redux-react-router-snippets
donjayamanne.python-extension-pack
eamodio.gitlens
eg2.vscode-npm-script
esbenp.prettier-vscode
janisdd.vscode-edit-csv
jasonnutter.search-node-modules
jawandarajbir.react-vscode-extension-pack
k--kato.intellij-idea-keybindings
KevinRose.vsc-python-indent
magicstack.MagicPython
ms-python.python
ms-python.vscode-pylance
naumovs.color-highlight
njpwerner.autodocstring
richie5um2.vscode-sort-json
rvest.vs-code-prettier-eslint
streetsidesoftware.code-spell-checker
TabNine.tabnine-vscode
VisualStudioExptTeam.vscodeintellicode
vscode-icons-team.vscode-icons
xabikos.JavaScriptSnippets
xabikos.ReactSnippets
yzhang.markdown-all-in-one
zhuangtongfa.material-theme
xuzhanhh commented 3 years ago

it seems will quit edit mode and turn to visual mode with vsocde vim in some cases

lastgosumatt commented 3 years ago

it seems will quit edit mode and turn to visual mode with vsocde vim in some cases

same for me, but almost all time

Mattiaslndstrm commented 3 years ago

it seems will quit edit mode and turn to visual mode with vsocde vim in some cases

Yes, almost all the time here too.

Magnusri commented 3 years ago

Fantastic feature!

I think it would be great if pressing arrow down or up(to select from the regular dropdown list) would disable the feature temporarily to allow tab to pick from the regular dropdown instead.

hugohabicht01 commented 3 years ago

What I personally noticed is that the inline completetions aren't really compatible with the vscode vim plugin (vscodevim.vim). When using a suggested completion by pressing tab, the vim plugin will go into visual mode, the vim cursor stays at the last typed character but a "normal", thin cursor will appear at the end of the completed code. This is quite an annoyance as you can't keep typing but instead need to spam esc to get back into normal mode and then move your cursor to the end again and go into insert mode before you can start typing again.

shadowndacorner commented 3 years ago

I've experienced the same issues as several others in the thread with this feature with the Vim extension for VS Code.

I also noticed similar issues with the markdown extension breaking tab auto completion as described by @shmkane. Based on my own experience with a simple navigation extension I wrote, it seems like the markdown extension specifically captures input overzealously - I noticed that it broke the backspace keybinding I use in my extension. I've only noticed that behavior when editing markdown files so far. Not sure if that's helpful at all for narrowing down that issue.

As a feature request, it would be nice if there was a way to request inline suggestions, similar to how ctrl+space opens the regular suggestion dropdown.

frizzant commented 3 years ago

I sometimes just use Tabnine as a kind of AI-assisted lexicon of what i may need, so I would suggest that it does show the other options too, instead of having to manually expand the other options, I'd like to see the inline suggestion, and the others too. (PHPStorm)

jrrmcalcio commented 3 years ago

I can't make it work, when a suggestion appears, i hit tab and just a TAB character appears :( I'm using VSCode 1.59.1, tabnine plugin: 3.4.26 and engine: 3.6.5-40 pro. Any help?

Thank you

igorsgm commented 3 years ago

Does this feature work with Jetbrains at all? I can't make it work on PHPStorm.

IRediTOTO commented 3 years ago

VS code just release new version inludes inline complete. Should I remove tab9 ? So confuse

IRediTOTO commented 3 years ago

I feel tab9 still smarter now

Eransho commented 3 years ago

Does this feature work with Jetbrains at all? I can't make it work on PHPStorm.

@igorsgm it should work with JetBrains IDEs. Is the inline completion option in your Tabnine hub is on? What is your tabnine plugin version?

hauselin commented 3 years ago

VS code just release new version inludes inline complete. Should I remove tab9 ? So confuse

I have the same question too. How does this overlap with vscode's suggest preview feature?

Also, this feature doesn't work very well with vscode vim.

Joeri-KIXX commented 3 years ago

The inline completions is totally unusable for me (working in Laravel 8) The code randomly disappears and is all messed up.

I made a video to show you what happens: https://app.vmaker.com/record/1BlZnP8UYeeeZe3g

CharlonTank commented 3 years ago

Sometime, it create newlines and remove some text, I guess it's because the indentations is wrong.

Mac OS 11.5 VS Code: 1.61.0-insider (Universal) Language: elm Extension: Pro version - Last updated 01/09/2021, 13:14:46

This may be related: https://github.com/codota/TabNine/issues/445

bigntallmike commented 3 years ago

I really want this feature to work, but while editing Python files in VS Code, I find it will suddenly start entering large amounts of text where I don't want it and there's just too much jumping around visually to track.

hienlh commented 3 years ago

Something went wrong when Im using this feature.

CleanShot 2021-09-10 at 09 27 54

I think the issue happened when combining with this feature

CleanShot 2021-09-10 at 09 30 29

CharlonTank commented 3 years ago

Something went wrong when Im using this feature.

CleanShot 2021-09-10 at 09 27 54

I think the issue happened when combining with this feature

CleanShot 2021-09-10 at 09 30 29

I get this problem as well ^

nosolosoft commented 3 years ago

Something went wrong when Im using this feature. CleanShot 2021-09-10 at 09 27 54 I think the issue happened when combining with this feature CleanShot 2021-09-10 at 09 30 29

I get this problem as well ^

Something similar here!

jarenal commented 3 years ago

I love this feature, the only problem I find is that when I accept a suggestion by pressing TAB, it leaves the CURSOR at the end of the sentence, and it would be ideal if the accepted suggestion is a function or method, leave the CURSOR inside the parentheses to start to write directly the arguments of the function or method. Thank you!

Current behavior:

$this->fooMethod()[CURSOR]

Desired behavior:

$this->fooMethod( [CURSOR] )

PS: I'm using Ubuntu 18.04 and PHPStorm 2021.2.1

AliXEagle commented 2 years ago

it seems will quit edit mode and turn to visual mode with vsocde vim in some cases

Same here

Vaillus commented 2 years ago

Something went wrong when Im using this feature. CleanShot 2021-09-10 at 09 27 54 I think the issue happened when combining with this feature CleanShot 2021-09-10 at 09 30 29

I get this problem as well ^

Something similar here!

Same for me! But it deletes my line of code as well. Pretty annoying, hope you'll find a way to fix it :)

shadowndacorner commented 2 years ago

As an FYI for those who are having issues with markdown (@shmkane for one), the markdown extension has a default keybinding for "tab". Removing that keybinding allowed me to use this correctly.

@dimacodota As for the Vim issues, it seems like this issue may be the cause, but that definitely isn't certain. That may just be an issue of a conflicting keybinding as well.

arsdragonfly commented 2 years ago

Something went wrong when Im using this feature. CleanShot 2021-09-10 at 09 27 54 I think the issue happened when combining with this feature CleanShot 2021-09-10 at 09 30 29

I get this problem as well ^

Something similar here!

Same for me! But it deletes my line of code as well. Pretty annoying, hope you'll find a way to fix it :)

I'm having similar issues and I'm using vim mode. Really hope that it gets fixed.

agi1512 commented 2 years ago

Hi. As of my experience (almost a week), i think it requires a minor improvement. Sometimes i type too fast, but ping to the server (i use cloud completions) is faster than my reaction time. So the problem is, when my reaction time is not good enough i type exactly as the model predicted for a couple of characters forward and i want to press tab to complete, but it already changed it's prediction to something else (usually less useful), requiring me to spend more time to undo changes and redo it.

Also little about multiline suggestions in inline mode. They are good (in a sense), but don`t work properly on pycharm, firstly they dont print \n character at all just some stuff like a=1print(a) instead of something like this

a=1 
print(a)

or at least like a=1 \n print(a) And also it uses tabs instead of spaces, which makes IDE panic. Looking forward for more stable inline mode, but for now switching to standard mode.

hsianktin commented 2 years ago

The idea of inline completions is great. But I often encounter moments when I press Tab to accept suggestions from vscode, but end up with the unwanted inline completion. I'm wondering if there is a way to distinguish them, maybe by making the inline suggestion also appear first in the suggestion list.

aka-bash0r commented 2 years ago

Just like @hsianktin already stated, it's kinda cumbersome to work with this completion style due to the conflicting bindings. Using Tab for VSCode / IntelliJ suggestions and Ctrl+Enter for TabNine helps to distinguish between the completion. On the other hand, this feels like the mental overhead you aim to mitigate.

Another rather annoying circumstance is that the TabNine pop-up + editor completion suggestions make it impossible to read the surrounding code in any meaningful way. I find myself often in a situation where I want to peek exactly at the previous line which is then hidden by TabNine.

hengzhe-zhang commented 2 years ago

@dimacodota Thanks for releasing such a powerful function. However, one tricky issue is that if I don't want to accept the suggestion and just want to move the cursor to the right, I need to press the "right" key two times. The first time is to cancel the inline suggestion, and the second one is to actually invoke the "right move" function. Such behavior will result in inconvenience. Why not let the "right move" key behave as normal?

Betristor commented 2 years ago

Can it be possible to alter key binding of next and last action? Alt + [ and Alt + ] are a little hard to reach.

aka-bash0r commented 2 years ago

Can it be possible to alter key binding of next and last action? Alt + [ and Alt + ] are a little hard to reach.

Depending on your IDE, you can rebind the hotkeys.

Betristor commented 2 years ago

Can it be possible to alter key binding of next and last action? Alt + [ and Alt + ] are a little hard to reach.

Depending on your IDE, you can rebind the hotkeys.

Thanks! Using VSC, and I changed its keybindings to Tab + a and Tab +d. These keys are more comfortable to use when I need a suggestion.

melpiro commented 2 years ago

Thank you a lot for this feature, it allow to save a lot of time when you combine it with good shortcut ! i use left/right arrow for prev/next suggest and space to validate it. The shortcut conflict are a little bit tricky to solve to not have problems with vscode suggestion list, but when it's well configured it's just awesome !

Foxhoundn commented 2 years ago

My 2 cents here as well - it works somewhat OK except when you decide to not use TabNine's suggestion and start cycling through VSCode's suggestions list - at that moment TabNine should be out of the picture.

Instead what happens is that I select whatever I want from the suggestion list, press [Tab] and of course TN inline prediction gets added instead :)

For example here:

Screenshot 2021-11-23 at 22 19 58

1) grid-template-data-align isn't a thing but that's a different issue 2) Right now there is both a suggestion box and an inline TabNine completion - the suggestion box is very prominent while TabNine's inline suggestion is muted and more difficult to see, yet it's the one accepted when Tab is pressed.

Edit: more info