Skip to content

Conversation

@LilithHafner
Copy link
Member

Followup for #50105

@LilithHafner LilithHafner added the REPL Julia's REPL (Read Eval Print Loop) label Jul 29, 2023
@LilithHafner LilithHafner mentioned this pull request Jul 29, 2023
7 tasks
@Krastanov
Copy link

Krastanov commented Jul 29, 2023

I feel a bit negatively towards such a change. Tab completion has been a useful "exploration" tool for me when trying to become a maintainer of a package I do not know well.

On the other hand, I recognize it might be more important to stop novices from finding and relying on internal implementation details. I see this is exactly the sentiment expressed (and "thumbed-up" by 4 people) in #50105 (comment)

Any chance it can be done so that tab-completion hides private symbols, but another completion hotkey is implemented that shows everything?

@KristofferC
Copy link
Member

I think the current implementation here is too harsh. Often one uses tab completion when working with ones own package to test and explore various internal fields and functions.

@LilithHafner
Copy link
Member Author

I agree—this requires more consideration which is why I broke it off of #50105.

@jpsamaroo
Copy link
Member

Could we choose not to complete private names only for when doing MyPackage.<TAB> (without any further characters)? This would allow completing private names when you know the first letters of the name that you want (you just forget the full name), but if you're using completion to find out about the public API, you probably won't specify any initial letters past the module name anyway (as you're still figuring out what names you need to use the package/module).

@mcabbott
Copy link
Contributor

Or perhaps they should be ordered to show public first (and print them in bold)?

Agree that finding your way around the internals is one use of tab completion, if less common than just trying to figure out how to use the package as intended.

@xgdgsc
Copy link
Contributor

xgdgsc commented Aug 3, 2023

Might be fine if inside the vscode extension here julia-vscode/julia-vscode#3240 with some configurations.

@fatteneder
Copy link
Member

Or perhaps they should be ordered to show public first (and print them in bold)?

Minor improvement to this: Make the public functions show last (and bold), because when tab completing your cursor will be moved after the suggestions and so you don't have to scroll up constantly.
Take Base as an example where this matters. Atm tab completing on my laptop throws a list of methods at doesn't fit on a single terminal page (with readable font size).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

REPL Julia's REPL (Read Eval Print Loop)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants