- (Bugfix) - Helix themes now properly inherit from parent names when not defined (that is, if
ui.x.y
isn't defined butui.x
is,ui.x.y
copiesui.x
.) (Thanks @guilhermeprokisch for catching this one.) - (Bugfix) - example terminal highlighter now works properly.
- (Bugfix) - updated Rust and Ada highlighting queries to behave properly.
- (Improvement, breaking) - the
Theme
API has been rebuilt to work with Helix editor themes instead of the previous bespoke implementation.- The
theme
module has been hoisted out of theformatter
module, and now lives at the crate root. - The new
theme::vendored
module includes a large collection of themes (in TOML definition format) vendored from the Helix project. - The
ThemedHtml
formatter has been reworked to use the newTheme
API. - The
theme
andhtml
features are no longer mutually dependent.
- The
- (Improvement) - a new
Terminal
formatter (using thetermcolor
crate) has been added. (@guilhermeprokisch) - Updated
tree-sitter
to0.23.0
. (@leandrocp) - Replace
once_cell
dependency withstd::sync::LazyLock
. - Update
ahash
andtoml
dependencies. - Added languages:
- Fish (shell)
- Julia
- Updated languages:
- Ada
- Assembly (generic)
- Astro
- Awk
- Bash
- Bicep
- Blueprint
- C
- Cap'n Proto
- Clojure
- C#
- Common Lisp
- C++
- CSS
- Cue
- D
- Dart
- Diff
- Dockerfile
- Emacs Lisp
- Elixir
- Elm
- Erlang
- Forth
- Fortran
- GDScript
- Gleam
- GLSL
- Go
- Haskell
- HCL
- Heex
- HTML
- INI
- Java
- JS
- JSON
- Kotlin
- Matlab
- Meson
- Nix
- OCaml
- OpenSCAD
- Pascal
- PHP
- Python
- R
- Racket
- Regex
- Ruby
- Rust
- Scala
- Scheme
- SQL (generic)
- Svelte
- Swift
- TS
- TSX
- Vimscript
- x86 Assembly
- Zig
- Removed languages due to a lack of working highlight queries:
- Astro
- Common Lisp
- Iex
- Removed the extremely bloated Nim parser due to
crates.io
size limits; if you need to highlight Nim, you can add the bindings as a separate dependency and useLanguage::Runtime
to load the grammar.
- Add Objective C language.
- Updated Rust, Svelte, and Python languages.
All thanks to @leandrocp.
- (Bugfix) - Fixed Lua not highlighting correctly.
- Updated languages:
- Elixir
- Erlang
- Gleam
- HEEx
- Lua
- CSS
- HTML
- Javascript
- Python
- Ruby
- SQL
- Added Svelte language.
- Added Vimscript, TSX and JSX languages.
- Update TOML dependency to
0.8
.
- (Bugfix) - Fix Javascript and Typescript highlighting (thanks @leandrop!)
- Updated Haskell grammar.
- (Bugfix, breaking) - The
ThemedHtml
formatter is now feature-gated behindtheme
instead ofhtml
. - (Improvement) - Remove
rayon
andindoc
from build dependencies, replacing them withstd::thread::spawn
andformat!
. This should speed up build times by a few seconds. - (Improvement) - Gate development portions of the build script behind a feature, further improving build times.
- (Improvement) -
Language::from_token
andHighlight::highlight_*
now accept anAsRef<str>
instead of a plain&str
. - (Feature) - Added the
Runtime
variant toLanguage
, which holds anfn() -> &'static HighlightConfiguration
. This makes it possible to use languages not statically known by Inkjet.
- (Bugfix) - Fix missing
cfg
attribute that made compiling without thetheme
feature impossible. - (Bugfix) - Fix typo in inline HTML formatter.
- (Feature) - Added new
plaintext
language. Under the hood, this uses thediff
grammar (small and cheap to load) but doesn't provide any highlighting queries, which makes highlighting with it a no-op. - Tidied up a few docs and added some additional tests.
- (Bugfix) -
highlight_to_writer
no longer erroneously shells out tohighlight_to_fmt
.
- (Bugfix, Breaking) - Due to an error in the test code, highlight configurations were not properly tested prior to this version. The following languages have been removed, as no working queries are available:
- CMake
- Jinja2
- Julia
- Just
- (Thanks again to @leandrop for the detective work. Hopefully I'll be able to re-introduce these languages down the road.)
- Added HEEx, IEx and EEx
- Fix some typos and missing names in
HIGHLIGHT_NAMES
- Fix HCL not being properly included in the languages list
Thank you to @leandrocp for the PRs!
Changes to formatters:
- (Feature) Added the
IoWrapper
newtype, which allows instances ofio::Write
to be treated as an instance offmt::Write
. - (Feature) Added optional
start_*
andfinish_*
methods toFormatter
. These methods are called once before and after highlighting, which is useful for formatters that need (say) to write a header or footer. By default, these methods are a no-op. - (Feature) Added theme-aware HTML formatter. This formatter generates HTML
span
elements with inline styles rather than class names, which is ideal for simpler use cases.- The new
Theme
type is additionally output-agnostic, making it usable in custom formatters for non-web use cases. Theme
s can be loaded from TOML files, or created programmatically.- Currently no themes are included, but I will likely bundle some in the future.
- The new
- (Improvement, Breaking) -
Formatter
now only requires an implementation ofwrite
(which takes an instance offmt::Write
). The*_io
variants now have default implementations that use the aformentionedIoWrapper
.
Changes to the primary highlighting API:
- (Feature) Added new
highlight_raw
method toHighlighter
, which gives direct access to the underlying iterator ofHighlightEvents
. For advanced use only. - (Feature) Added new
highlight_to_fmt
method toHighlighter
, which highlights to an instance offmt::Write
. This is useful for highlighting into an existingString
or more exotic implementors likeOsString
.
Other changes:
- (Bugfix) Corrected some erroneous documentation.
- (Feature) Added new languages:
- WASM (WAT and WAST)
- (Enhancement, Breaking)
HIGHLIGHT_CLASS_NAMES
now separates selectors with spaces rather than dashes. For example,type-builtin
is nowtype builtin
. This makes theming in CSS easier, as you can simply style (say) thekeyword
class and have that automatically apply to everykeyword
variant. (Of course, you can override this by using chained selectors, such as.keyword.function
.)
- (Feature) Added new languages:
- Astro
- Awk
- Bicep
- CMake
- Forth
- GDScript
- Gleam
- INI
- Jinja2
- Julia
- Just
- LaTeX
- YAML
- (Feature) Highlighting queries from the Helix project are now used where possible.
- (Feature) Added the ability to enable and disable certain languages via Cargo features. All languages are enabled by default (using the
all-languages
feature.)
- (Bugfix) Removed a stray debug
println!
from thewrite_io
implementation of the HTML formatter.