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

Autocomplete improvements #2843

Merged
merged 13 commits into from
Mar 13, 2024
Merged

Autocomplete improvements #2843

merged 13 commits into from
Mar 13, 2024

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Mar 7, 2024

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

  • new browser setting PLUTO_TOGGLE_CM_AUTOCOMPLETE_ON_TYPE(true) to enable always on autocomplete
  • don't autocomplete numbers
  • enable complete_anyword for Identifiers only
  • when autocompleting sqrt(, show a list of methods but ignore selecting one
  • cleanup backend code
  • the validFor setting
  • autocomplete global variables instantly
  • more option colors

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

Schermopname.2024-03-12.om.14.33.31.mov

After

Schermopname.2024-03-12.om.14.33.51.mov

@fonsp fonsp added the frontend Concerning the HTML editor label Mar 7, 2024
Copy link
Contributor

github-actions bot commented Mar 7, 2024

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 fonsp merged commit 53f219b into main Mar 13, 2024
13 of 16 checks passed
@fonsp fonsp deleted the autocomplete-7-march-2024 branch March 13, 2024 08:29
@fonsp
Copy link
Owner Author

fonsp commented Mar 13, 2024

JunoLab/FuzzyCompletions.jl#15 would be nice!

@fonsp fonsp added the autocomplete <TAB> label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocomplete <TAB> frontend Concerning the HTML editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant