2.0.0 - A compiler for syntax highlighting! #825
lhecker
announced in
Announcements
Replies: 3 comments 1 reply
-
|
Nice! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Awesome work everyone 👏🏾🚀 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I've done |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Syntax Highlighting
Edit v2 adds the Lightweight Syntax Highlighter. It has a ~40kB footprint for a dozen languages plus runtime, barely grows with each language added, and runs at >100MB/s.
The highlighter is based on a simple programming language that combines regular expressions with explicit control flow. It's designed such that the runtime can be easily ported to other languages, including JavaScript.
The list of languages will surely grow over time, and contributions for widely used languages are very welcome.
If you're an experienced compiler developer, we'd greatly appreciate any advice and contributions to the LSH compiler. If you're interested in ports of the runtime, please let us know!
See you in v3, with the introduction of a tiny CSS parser for UI theming.
Changes
The whole LSH stack: compiler, runtime, integration, and initial language definitions. See above.
For path matching, we've written our own glob matcher (Add a glob matcher #743).
settings.json(Add a JSON parser #742, Add rudimentary settings.json support #779)For now, this is limited to
files.associations, which lets you map file paths and extensions to languages for syntax highlighting. I expect v3 to be centered around configurability.You can use
$1,$2, etc. in the replacement string when regex mode is on.file2.txtsorts beforefile10.txt, as it should.Bug Fixes
We were using
srgb_to_linearon premultiplied colors, which is no bueno.No more phantom selections when you just wanted to scroll.
UTF-8 parsing for SGR mouse coordinates,
sighandler_twarnings, GDB pretty printing.$) (Fix zero-width regex replace #815) (thanks @MihneaTeodorStoica!)Smaller Changes
lines_fwdandlines_bwdfor LoongArch #539, Optimize SIMD impl oflines_fwdandlines_bwd#535, Add SIMD impl ofmemchr2for LoongArch #551, Add SIMD impl ofmemsetfor LoongArch #547, Use unified data types in LoongArch SIMD intrinsics #602, Enabledefaultfeatures forbuild-std#554) (thanks @heiher!)--helpor--versionno longer requires a TTY (Fix printing help/version without TTY #556, Fix reading redirected input from stdin #810)SetConsoleModefailures now show a useful error message (sys/win: display a useful error message when SetConsoleMode fails #639)Build & Packaging
EDIT_CFG_ICU*(Make the ICU SONAME configurable #495)If this interests you, read the section at the end.
snapcraft.yamlwas added for Snap package builds (Add snapcraft.yaml #500) (thanks @aaronprisk!).desktopfile was improved (feat: improve desktop file #560) (thanks @Nukleari!)All translations live in
i18n/edit.tomlfor now. The system allows us to dynamically add more languages over time.See our readme for more information.
clippy::ptr_as_ptrlint was fixed (clippy: fix ptr_as_ptr lint #730) (thanks @xtqqczze!)All nightly features have been replaced with our own, lovingly handcrafted unsafe code.
Localization, Internationalization, Documentation
This release adds 19 new languages, bringing the total to 30 (#596, #629, #634, #655, #663, #669, #688, #693).
Thanks go out to (in no particular order): @viyic, @VenusGirl, @mrFlamel, @MKAbuMattar, @OMouta, @miteigidesu, @bitigchi, @ebraminio, @omegahm, @xTacobaco, @marinac-dev, @marginal23326, @NandeMD, @msoltanov, @TotiTolvukall, @hidden-being, @peterblazejewicz, @schilive, @ioma8, @maikkundev, @webmaster442, @Erithax, @spinualexandru, @ronja-koistinen, and @KarpenkoY!
Other documentation:
Additional notes to Build & Packaging
To summarize the changes above:
For instance, a build on Debian 13 (Trixie) may look like this:
This discussion was created from the release 2.0.0 - A compiler for syntax highlighting!.
Beta Was this translation helpful? Give feedback.
All reactions