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

Method autocompletion for given argument type #199

Open
sairus7 opened this issue Dec 5, 2018 · 3 comments
Open

Method autocompletion for given argument type #199

sairus7 opened this issue Dec 5, 2018 · 3 comments

Comments

@sairus7
Copy link

sairus7 commented Dec 5, 2018

If you are not familiar with common packages functionality, you may waste some time searching the function needed for the particular object type.

In OO languages you can simply look for methods in a pop-up list when you type a dot after an object. For now I don’t know how to do similar thing in Atom/Juno - there are pop-ups only for method names, not for the first argument type.

There is methodswith(typeof(x)) function for a complete list of methods with an argument of given type, but it is too long list and should be filtered with a substring, or sorted by occurrence rate (or both sorted and filtered).

Since there is no dot-method syntax in Julia, it can be probably bound to some hotkey after entering a variable name.

@pfitzseb
Copy link
Member

pfitzseb commented Dec 5, 2018

This definitely would be very useful to have, but right now we could only make this work in a very limited number of cases since we basically only have type information for global objects. Once static analysis (with type propagation) is a bit further along this might actually be worthwhile though.

@sairus7
Copy link
Author

sairus7 commented Dec 5, 2018

Indeed, this is a part of static analysis.

In general, it would be great to have more static type-related info about variables and methods used, because every time I look into some unfamiliar module, I can't say what method is used on what data type, I can't go to method definition, and this leads to poor understanding of what happens.

@pfitzseb
Copy link
Member

pfitzseb commented Dec 5, 2018

I can't go to method definition

That's not true (at least if the code is loaded) -- Go To Definition should work fine regardless.

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

No branches or pull requests

2 participants