Repository navigation
A library API for other Rust crates (changed definitions, git revisions, an embeddable viewer),
Vue parsed as code, and the Maximal preset.
Added
- A library API for other Rust crates:
omnidiff::Diff::files(before, after)or
omnidiff::Diff::new(before, after, language), thenchanged_functions(),changed_types(),
changed_modules(),changed_top_level_definitions()andchanged_definitions(): what
happened to each function, method, type, module and impl block (added, removed, modified, moved,
renamed, and whether only comments or whitespace changed), each named the way the language's
imports name it (crate::parser::Parser::parse,com.acme.Parser.parse,
Acme\Parser::parse), in 20 languages.ranges(side, preset)gives the changed text as byte
ranges and positions, andenclosing_definitionthe definition around a byte, like git's hunk
header. Use the crate withdefault-features = falseto leave out the terminal viewer
(#109). - The
gitfeature addsomnidiff::git:Repository::open(path), thencommit("HEAD"),
range("main", "HEAD"),staged()orunstaged()(untracked files included), each changed
file anomnidiff::Diffread lazily from the object store, and
changed_definitions()across all of them. Qualified names are read from the revision's own
go.modand__init__.py. Built on gix: pure Rust, no network, no C. omnidiff::Diff::from_texts(before, after, before_path, after_path)diffs two texts named by
paths that need not exist, each side in the language its name and contents say.
line_operations(side, preset)says what happened to each line, andstats(preset)how big the
diff is in inserted, deleted, updated and moved lines (omnidiff::Stats, which adds up across
files).omnidiff::tui::embed::DiffView: one file's diff as the viewer draws it, for another ratatui
application to host in aRectof its own, driven by the keys the host passes on and handing
back the ones it has no use for.- A new highlighting option, "Highlight changed spaces at the end of a line" in the
Mpanel
(changed_trailing_whitespace): spaces or tabs added, removed or changed after the last
character of a line that otherwise stayed the same are highlighted, and so is a blank line of
spaces that was added or removed. A file that differs only in whitespace at line ends now shows
where. On in--maximal, off in--minimal, which never highlights trailing whitespace. - Vue single-file components (
.vue) are diffed as code, with the tree-sitter-grammars Vue
grammar, when a file parses without errors; other Vue files keep the line diff
(#117). - A one-line installer:
curl -fsSL https://ivankovic.github.io/omnidiff/install.sh | shinstalls
through Homebrew where you have it, the signed apt repository on Debian and Ubuntu (it asks
before adding the key), and otherwise the prebuilt binary under~/.local, checked against
the release'sSHA256SUMS.txt.
Deprecated
omnidiff::diff_strings: its node ids pointed into syntax trees it had already dropped. Use
omnidiff::Diff::new.
Changed
- The fuller highlighting preset is now called Maximal instead of Full:
--maximalon the
command line,2 Maximalin theMpanel, andRenderOptions::MAXIMALin the library.
--fullandRenderOptions::FULL(deprecated) still work. - In a file without a grammar, a line that changed only in its trailing whitespace counts as the
same line:--minimalshows it unchanged,--maximalhighlights just the whitespace.
Security
libz-sys1.1.33, for RUSTSEC-2026-0544, andzip9.7.3, for RUSTSEC-2026-0548.