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

integrate JuliaSyntax.jl #2526

Merged
merged 24 commits into from
Aug 24, 2023
Merged

integrate JuliaSyntax.jl #2526

merged 24 commits into from
Aug 24, 2023

Conversation

Pangoraw
Copy link
Collaborator

@Pangoraw Pangoraw commented Apr 9, 2023

image

  • Investigate time to first parse (seems negligable on v1.9+ add a very basic precompile workload JuliaLang/JuliaSyntax.jl#213)
  • Prevent roundtrip to notebook process by making ParseError <: ReactivityError and using relay_reactivity_error!.
  • Make each diagnostic clickable and selects the problematic span.
  • Find and resolve the CM bug which lead to the update being reverted.
  • Cleanup the javascript (replace custom events with hooks?)
  • z-index for lint boxes
  • parse (debounced) as we type and not just on submit?
  • Map highlighted ranges up to date with content?

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2023

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="julia_syntax")
julia> using Pluto

@fonsp fonsp added enhancement New feature or request frontend Concerning the HTML editor backend Concerning the julia server and runtime wide audience This affects a wide audience of Pluto users and future Pluto users labels Apr 26, 2023
@Pangoraw
Copy link
Collaborator Author

Pangoraw commented Jun 21, 2023

JuliaLang/julia#46372 has been merged 🎊 and JuliaSyntax will become the default parser in 1.10 ! I will come back to this PR and probably drop the JuliaSyntax dependency (make it work only on >=1.10 or with JuliaSyntax + enable_in_core!).

@Pangoraw Pangoraw changed the title WIP: integrate JuliaSyntax.jl integrate JuliaSyntax.jl Jun 27, 2023
@Pangoraw Pangoraw marked this pull request as ready for review June 27, 2023 21:04
@Pangoraw
Copy link
Collaborator Author

The last problem is z-index positioning of the tooltip which is wrong when the cell is not in focus or with the run button.

image

I tried setting the z-index for .cm-tooltip but this does not seems to work. Maybe this can be fixed by changing the positioning from fixed to absolute.

The same problem happens with autocompletion tooltip but it is less of a problem (notice the run button over):
image

Pinging CSS Expert @pankgeorg, you may have an idea on how to fix that ? 😃

@Pangoraw
Copy link
Collaborator Author

I found a solution for the z-index problem above in c45201b. This PR is now ready!

@Pangoraw
Copy link
Collaborator Author

One future improvement is identifying error messages we can propose quick fixes for (like "replace else if with elseif) and add fix actions to the tooltip:

quick_fix_example

I am going to merge once the CI pass as it only affects 1.10 users for now (and slightly improves the display of syntax errors for VERSION < 1.10).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Concerning the julia server and runtime enhancement New feature or request error display How errors and stack traces are presented frontend Concerning the HTML editor wide audience This affects a wide audience of Pluto users and future Pluto users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants