github fonsp/Pluto.jl v0.20.5

latest releases: v0.20.18, v0.20.17-src, v0.20.17...
5 months ago

Try this release in your browser! (Available 30 minutes after the release)

Binder logo

Generate your own binder links using pluto-on-binder.glitch.me!

New features – new CodeMirror parser

Context: Pluto uses two Julia parsers: one in Julia (the one provided by Julia itself) to run and analyse your code, and a second parser in your browser used for code highlighting, autocomplete and other special syntax features, updated as you type.

1. Rewritten parser

This version of Pluto comes with a completely rewritten browser Julia parser. The new parser was contributed by Sergio Vargas. Main advantages are:

  • More detailed parser output. This makes it easier to pattern-match features to syntax structures.
  • Different handling of strings and comments, making string-related features easier, such as mixed parsers (e.g. highlighting Python inside Julia).
  • Better maintainability of the parser, much faster compilation.

2. New color scheme

Sergio Vargas also designed a new color scheme for syntax highlighting, to go along with the new parser. The new color scheme fixes contrast issues for better accessibility and general use.

3. Reduced complexity

The more detailed parser output allowed us to significantly reduce complexity on the Julia side (#3132, @fonsp), removing 2000 lines of code and fixing performance issues.

  • Pluto has its own (rough) implementation of Julia's scope system, which has been completely rewritten for much better performance.
  • The fixed performance issue allows us to do local variables autocompletion: autocompletion for variables that are only defined in local scope, like function arguments.

List of changes

Core PRs:

List of issues and PRs related to the change:

  • Reenable cm6 locals autocomplete (#3151) (@fonsp)
  • Syntax highlighting error involving range and macro (#2063)
  • Global not marked after (#2575)
  • Expression of the form [f(y[i]) for i in v] disables global highlighting in the cell (#2724)
  • Wrong formatting of a comment (#2731)
  • Improve contrast of code highlighting (#2921)
  • Update CodeMirror Julia support (#2943)
  • String highlighting confused by "#" (#3065)
  • CodeMirror: function product without * after macro (#3116)
  • CM6: string macro with empty contents (#3131)
  • Autocomplete inside let block not showing locals (#3149)
  • cm6 new scopestate: function arguments with type (#3152)

New features – other

  • Improved runic formatter support: fix fake_bind (#3106) (@j-fu)
  • 🎨 Update cell deleted popup styling (#3148) (@fonsp)
  • Better experience after deleting the only cell of a new notebook (#3140)

Performance improvements

  • frontmatter(nbpath::String) performance fix (#3150) (@fonsp)

Fixes

  • Fix MsgPack issue with AppendOnlyMarker (#3141) (@fonsp)
  • Moving file during Safe Preview not fully supported (#3136)

Internal changes

Diff since v0.20.4

Don't miss a new Pluto.jl release

NewReleases is sending notifications on new releases.