Closed mihrits closed 4 weeks ago
I thought it was more documented but indeed it's not clearly stated in the original PR.
The way to disable this (in a way that persists between Pluto sessions for the same browser and port) is to open your browser developer console and execute the following:
PLUTO_TOGGLE_CM_AUTOCOMPLETE_ON_TYPE()
which is a function that toggles whether this behavior is enabled or not.
You can also check your current pluto browser cached options with window.localStorage
:
That being said, as a comment to the issue at hand I also find the automatic autocomplete especially on ,
and .
to be more frustrating than useful in my case, so I'd rather this be toned down as well (I also discussed this with @Pangoraw at the juliacon hackaton)
Thanks for the feedback @mihrits !
Could you give some examples of cases where this happened during your normal work? The example x, y, z
that you gave is happening because x,y,z
are not defined in the empty notebook that you made to demonstrate the issue. But I'm curious when exactly the eager autocompletion is an issue during real use.
For other people who see this issue and want to leave feedback, please record a video and open a new issue! (Instead of replying here) It is helpful for us if different specific autocomplete problems are addressed in different issues.
During normal work, this happens when I define new variables or functions. For example, when I try to define x, y, z = crds
. Or another example, when I define a function with a short name. For example, when want to define function f(x)
I have to use <esc>
before writing the parenthesis. This also happens when listing columns from a DataFrame, because (I think) the column names are not defined and when I have a list of short column names, I have to cancel the autocomplete after every name before adding a comma. For example, select(df, :Ex, :Ey, :Ez)
.
Totally agree, it definitely feels overeager very often. Auto-accepting completions makes blind/muscle memory typing impossible. Thanks for the solution to turn it off! IMO, a better way would be to show completions automatically, but only accept them on tab.
To me it also happens when I load new packages (since those seem to not be defined variables?), or when I want to broadcast Float64.(
when typing the . some autocomplete starts and goes bogus.
Also as said before, defining any new variable has become a quite annoying.
I like the more inactive variants, that TAB
autocompletes (like VS code does for example) but space does not.
edit: It would be nice to have this disabling somewhere in a menu and maybe even something saved in some preferences. To me the current default is very very very different to what I am used in VS Code and I get annoyed by this roughly every 30 seconds.
I noticed the most annoying auto-complete-trigger by now is .
if you have the smallest typo somewhere, usually the .
would not open the autocomplete for fields, one would notice the typo, goes back and it is fine.
With the smallest typo, the autocomplete tries to guess anything maybe close to the typo, but usually far far off. That gets me very often and is (for me) super annoying.
I have disabled most trigger characters in https://github.com/fonsp/Pluto.jl/pull/3055 :)
If you find more issues with autocomplete, please record a video of where you found the issue, and maybe a notebook file. Looking forward to hear more feedback!
I'm looking forward to hear more feedback! I understand that some functionality has been frustrating, and I hope it didn't cause too much trouble.
Why go through all this trouble? I think that autocomplete-on-type is a really valuable tool for new programmers, as it can help with:
model_refined
instead of m2
) without having to type moreI think Pluto is in a good position to offer good autocomplete because:
Thanks for reducing this a bit. It looks like
[f, = ...
or defining a function with multiple returns
f, p, q = myfun(x) = ....
This would (still in my version currently) autocomplete to factorial, quote, pairs = myfun(x) =
.
When that was even on space, this also hit me defining any variable. Sure, you wanted to test that and I was a test item then, but it was not so productive working in Pluto recently; great that you turn that a bit back.
In general I feel, automatically doing this should be done super careful. I really like Julia 1.11-REPL on this with the grey proposals – but still requiring TAB to take it. But I might be an extreme case on that opinion probably and other might prefer more automation.
@kellertuer the PR https://github.com/fonsp/Pluto.jl/pull/3055 has not been released yet. Can you pkg> add Pluto#main
and edit your comment?
To avoid confusion, I will close this issue which is mostly about the auto commit characters ,
.
(
[
{
which have been removed in https://github.com/fonsp/Pluto.jl/pull/3055. If your problem is about this feature: just wait until Pluto 0.20.0 gets released!
For more autocomplete feedback, please open a new issue and record a video. Try to be friendly and supportive!
I can check when I find time for that, sure.
I have noticed that Pluto has started to eagerly autocomplete things that I don't want to autocomplete. It seems that autocompletion is carried out by many different triggers; for example, I have found so far
,
,.
,(
,[
, in addition to<Tab>
. A recording of this behavior:https://github.com/user-attachments/assets/0e7f5cba-1467-4678-8c55-891d904f9bb0
This is really counterproductive; for example, when trying to write
x, y, z
, I have to press<Esc>
every time before entering a comma.There is a short discussion on Slack in the #pluto channel with a suggestion that this might stem from PR#2942 (I am using MacOS). This behavior is also mentioned in Discussion#3001. I was encouraged to open an issue, as this was bothering more people.
I would expect the autocomplete to be carried out with explicit
<Tab>
or when starting to choose autocomplete options with arrow keys and then<Tab>
or<Return>
.Information about my setup:
This behavior shows up in
[c3e4b0f8] Pluto v0.19.46
.