fonsp / Pluto.jl

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

Autocomplete improvements #2843

Closed fonsp closed 3 months ago

fonsp commented 3 months ago

I would like to enable autocomplete on type (without having to press <TAB>), but it needs to be in a better shape before we do that :)

This PR makes some improvements and adds a setting to preview always on autocomplete

In this PR

Using validFor

Codemirror gives the option validFor, which lets you say "i found the completions for the currently typed text, and if you type one of these characters, you can just filter the results instead of asking me again". I implemented this, and now it's more snappy!

Before

https://github.com/fonsp/Pluto.jl/assets/6933510/4c39ae99-3ac5-4d80-9fbb-9be5eed5f35d

After

https://github.com/fonsp/Pluto.jl/assets/6933510/d6dbb238-e2b2-4461-a51a-f2d68ef81f39

github-actions[bot] commented 3 months ago

Try this Pull Request!

Open Julia and type:

  julia> import Pkg
  julia> Pkg.activate(temp=true)
  julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="autocomplete-7-march-2024")
  julia> using Pluto
fonsp commented 3 months ago

https://github.com/JunoLab/FuzzyCompletions.jl/pull/15 would be nice!