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 latex and emoji super fast #2876

Merged
merged 6 commits into from
Mar 29, 2024

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Mar 29, 2024

This PR loads all latex and emoji symbols once, and then completes them locally with JavaScript: https://codemirror.net/docs/ref/#autocomplete.completeFromList

This makes the symbol completions instant, because there is no network overhead.

The initial download of symbols is only 60 kB, it's triggered the first time autocomplete is used.

Before

With "Slow 3G" network throttling:

Schermopname.2024-03-29.om.22.10.36.mov

With "Fast 3G" network throttling:

Schermopname.2024-03-29.om.22.59.43.mov

After

Schermopname.2024-03-29.om.22.08.34.mov

@fonsp fonsp added enhancement New feature or request frontend Concerning the HTML editor performance labels Mar 29, 2024
Copy link
Contributor

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-latex-emoji-preloaded")
julia> using Pluto

@fonsp fonsp merged commit aaaae4c into main Mar 29, 2024
13 checks passed
@fonsp fonsp deleted the autocomplete-latex-emoji-preloaded branch March 29, 2024 22:58
@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> enhancement New feature or request frontend Concerning the HTML editor performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant