Hinting (autocomplete) in 1.11 REPL as opt-in instead of opt-out

Ok, 1.11 added hinting to the Julia REPL: Julia 1.11 Highlights.

I think most users will find this useful, but I feel like this feature might be better in a separate package like OhMyREPL.jl or something: GitHub - KristofferC/OhMyREPL.jl: Syntax highlighting and other enhancements for the Julia REPL

For anyone wondering how to turn it off, you can just add the following to your ~/.julia/config/startup.jl file:

atreplinit() do repl
    if VERSION >= v"1.11.0-0"
        repl.options.hint_tab_completes = false
    end
end

I know this is a repeat of the information in the Julia 1.11 highlights, but it took me some time to find that, so I thought it was important to post it here as well.

I really do appreciate the ability to opt out of the feature at startup, but feel like this is one of those things that should only be turned on iff users want it. At least for me, this feature made it really hard for me to use the REPL until I turned it off. EDIT: Ok, not “really hard,” more like “mildly annoying.”

I feel I’m in the minority here, but want to voice my opinion regardless. This might lead into a discussion about a julia tutorial or simple install script that teaches users how to more easily configure the REPL to suit them. Maybe we can run a juliastartup script when users launch Julia for the first time and ask which features they want (all / none / some) in their startup file. Other features might include OhMyREPL and Revise package autoloading, @edit editor setup, default number of threads, etc.

EDIT: putting the words intellisense and code completion here so people coming from VS code can find this post and easily turn the feature off if needed.

3 Likes

Thank you for sharing this; the snippet should be widely accessible and easily findable. I’ve got this piece of code everywhere by default since 1.11 came out, for 95% of my usecases the eager autocomplete was simply not usable, I was waiting a second for each character to appear. Not even talking about what’s happening on HPCs.

If there is going to be any poll on whether this should be opt-in or opt-out, I’d really love to vote for the change to opt-in.

If we can do an intermediate solution, it would be great to move this in the documentation from the current place (release notes for 1.11 I think) to a part that is likely to be seen by beginners (before they get annoyed like me).

(Personal opinion: In a larger view, we should aim for efficiency by default – which isn’t quite the case here, as this possibly triggers compilation on each keystroke.)

2 Likes