Codly v1.1.0: beautiful and easy code blocks

New codly release :tada:

Docs: https://raw.githubusercontent.com/Dherse/codly/main/docs.pdf

Just gotta wait for it to be merged: codly:1.1.0 by Dherse · Pull Request #1365 · typst/packages · GitHub

This ended up being a significantly bigger release than expected. Short highlight of new features:

  • New documentation
    • Guide on getting nice icons
    • Guide on local states
    • More examples
    • Improved style and readability
  • Now works with raw.line show rules!
  • Added header and footer arguments
  • More powerful relational offsets (i.e offset a code block by the number of lines in another one)
  • Highlights:
    • no longer grab extraneous tokens (i.e whitespaces, parentheses, etc.)
    • :warning: Breaking change: now index properly, no longer globing tokens (i.e you can set a highlight starting and stopping anywhere)
    • have proper indexing when not using tag
  • Allows for more than one range of lines to be shown
  • Improved local settings (still waiting for custom elements):
    • :warning: Breaking change: No longer supports nested local blocks by default, requires nested: true argument

    • :warning: Breaking change: No longer supports disabling codly by setting enabled: false

    • Significantly increased performance (linear speedup with document length, can be >> 10x for long docs)

    • Explicit support of nested locals using states

  • Significantly increased performance using new argument handling, and improved argument handling
  • Smart indentation now works without line numbers
  • Makes full use of Typst v0.12.0 features (i.e context, to-dict, etc.)
  • Now officially supports per-language settings! (see docs!)
  • Improved referencing:
    • Shorthand syntax for line referencing: @my-block:4
    • New guide in the documentation

Thanks to those that contributed and reported bugs!

14 Likes

For anybody reading: there was a bug with references, version v1.1.1 of Codly has been released with a fix and one more feature: skip-last-empty