fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
5k stars 293 forks source link

Better autocomplete #302

Closed fonsp closed 7 months ago

fonsp commented 4 years ago

Sorting autocomplete results:

Right now results are presented in alphabetical (i.e. code index) order. The dream is to have full AI power like kite.com, but perhaps there are some simple improvements to be made first.

Please post other ideas and suggestions!

cadojo commented 4 years ago

Is there a way to use REPL unicode shortcuts (i.e. \sum<tab> --> ∑) in Pluto? If not, would that fit in here?

As an aside, I love the project and I'm interested in contributing, but I've never used Javascript before so I think trying this task would be slow going for me.

fonsp commented 4 years ago

Those already work inside Pluto - is it broken for you? You might need to press TAB twice.

fonsp commented 4 years ago

Great to hear that you want to contribute! If you want to work with Julia instead of JS, then writing sample notebooks might be the most fun. Ideas here and here, I'd be happy to have a video call if you have an idea: fons@plutojl.org

cadojo commented 4 years ago

Those already work inside Pluto - is it broken for you? You might need to press TAB twice.

Ah I must have missed it before, it is working for me! Thanks!

writing sample notebooks might be the most fun

I'm about to start my last year of grad school, I'll be taking a few aerospace dynamics courses this semester that might offer opportunities for interesting functional programming examples. I'll see what my classes look like - if an assignment fits, two birds with one stone. If not, I'll add an example or two this semester. I'll send an email with ideas once they're more thought out!

fonsp commented 4 years ago

Nice! i think a functional programming sample could be really useful - Pluto makes more sense when you program in the functional style

fonsp commented 4 years ago

https://github.com/fonsp/Pluto.jl/issues/111#issuecomment-683432200

pbouffard commented 4 years ago

I'm not sure what it's called (fuzzy searching maybe?) but the kind of autocomplete where you are shown results that include not just those that begin with the characters you've typed so far.

I.e. like:

image

I use this constantly in various IDE's, including VS Code.

fonsp commented 4 years ago

I implemented export info and type info in https://github.com/fonsp/Pluto.jl/pull/606

pbouffard commented 4 years ago

Possibly of interest: https://github.com/tkf/InteractiveCodeSearch.jl

aviatesk commented 4 years ago

As for "fuzzy search", we can use FuzzyCompletions.jl as a drop-in replacement of REPLCompletions module (, which is actually a backend completion engine for Juno). @fonsp what do you think on this ? If we want to try this out, I'm welcome to make up a PR.

fonsp commented 4 years ago

Interesting, if it is really that easy then your PR would be very welcome!

FeldrinH commented 3 years ago

Maybe there already is an option for this, but it seems that currently the autocomplete only shows suggestions if you press tab.

In most editors, the autocomplete starts showing suggestions as soon as you start typing, which is a lot more convenient and faster, because you can just type without thinking about autocomplete, and then accept a suggestion if you see the correct one pop up.

fonsp commented 3 years ago

Thanks @FeldrinH ! We want to enable autocompletion on every keystroke, but I think we should only enable this if our autocomplete is good enough, otherwise users might get frustrated. The big IDEs generally have a scoring mechanism to judge whether a completion is relevant enough to pop up without prompt.

icweaver commented 3 years ago

Would it be possible to list file/directory paths on pressing the tab key first instead of a character that already exists? The workaround was to enter "<some path>/.<TAB>", but I don't think that this seems to work anymore?

This feature has been super handy for navigating around directory trees without needing to look up what files already exist in a separate terminal

mkschleg commented 3 years ago

Coming kind of late to this. But it would be super neat if when autocompleting unicode commands like \eta it displayed the the unicode character in the right column of the autocomplete. Would also be nice for students who might not be as familiar w/ latex equation voodoo.

hungpham3112 commented 2 years ago

Does Pluto has autocomplete when typing without press <Tab> at first?

fonsp commented 7 months ago

Everything here is implemented! Last item is #2389 :)