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

Completions: Tension between autocomplete on backspace and viewing function sources #1563

Closed
DavisVaughan opened this issue Oct 11, 2023 · 2 comments
Assignees

Comments

@DavisVaughan
Copy link
Contributor

Say I want to look at the source of slide_index_sum(), typically I:

  • Type enough to let the completions figure out what I want and hit Tab to accept the completion
  • Hit backspace to remove the () that get inserted
  • Hit Enter to just submit slide_index_sum and see the source

#1502 has added some tension to this workflow. It is now quite hard to do this because of the very aggressive 10ms delay before completions pop up. I basically have to Esc out of the quick suggestion window

Screen.Recording.2023-10-11.at.2.53.13.PM.mov

Turning the delay up to 250ms does basically fix the problem, but I also want to note that RStudio has some smarts around this, and while it does use backspace as a "trigger" character to provide suggestions, it does not try to provide suggestions after removing the (), so this is never a problem there:

Screen.Recording.2023-10-11.at.3.01.43.PM.mov

I wonder if we can find a way to not kill the intellisense session when the user typos their way off the quick suggestion menu. Maybe that would be better than using the backspace key as a "trigger" character for a new intellisense session?

@jgutman
Copy link
Contributor

jgutman commented Oct 19, 2023

Note that I also have this same issue if I want to see the help for a function. If I do ?filter, parentheses get added. Help still works if I call ?filter() instead of ?filter, but it would be nice to have the smarts not to add the parentheses after a ? as the first character (I don't know if this should be considered a separate issue)

@juliasilge
Copy link
Contributor

In build 1453 this now works really nicely for viewing function source:

function-source.mov

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants