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

[AC] AC should hide once the whole word is typed and that word is the only suggested #934

Closed
predragnikolic opened this issue Mar 29, 2020 · 8 comments

Comments

@predragnikolic
Copy link
Member

Noticed a bug with latest changes:

When, in Python, I'm typing False and getting an (only) suggestion with it, the suggestion popup doesn't disappear once I've typed whole word. It did before those changes.

Screenshot 2020-03-28 at 21 49 09

Originally posted by @rchl in #866 (comment)

@rwols
Copy link
Member

rwols commented Apr 3, 2020

This looks like the complete opposite of #935 :)

@rchl
Copy link
Member

rchl commented Apr 3, 2020

Not really IMO as here you expect the popup to disappear because you've typed full and exact suggestion.

The other issue is about popup being hidden when match is only partial.

@predragnikolic
Copy link
Member Author

predragnikolic commented Apr 3, 2020

Not really IMO as here you expect the popup to disappear because you've typed full and exact suggestion.

I would only add "... disappear because you've typed full and exact suggestion and there are no other completion items available."

@predragnikolic
Copy link
Member Author

predragnikolic commented Apr 3, 2020

I think that sublime should handle this case.
I see nothing I should do about it in LSP.

@rwols
Copy link
Member

rwols commented Apr 27, 2020

I believe ST cannot hide the AC widget, because it’s a command completion. And selecting a command completion has the potential to replace “False” with “True”.

@rwols
Copy link
Member

rwols commented Apr 27, 2020

We could optimize for cases when:

  • the server only sends insertText,
  • the server has no completionResolve capability. There are no additionalTextEdits.

If these two conditions are true, then instead of a command completion we can use a snippet completion.

@rwols
Copy link
Member

rwols commented Apr 28, 2020

As it turns out we can always use a snippet_completion for pyls.

@rwols
Copy link
Member

rwols commented Apr 28, 2020

#992 also fixed this.

See the gif:

Peek 2020-04-28 18-36

Because snippet completions are sufficient for pyls.

@rwols rwols closed this as completed Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants