Commit Graph

665 Commits (dda64336e6d58d693b01347e6e8b1172118966d6)

Author SHA1 Message Date
Wilfred Hughes dda64336e6 Use tree-sitter-make from crates.io 2024-12-21 14:10:07 +07:00
Wilfred Hughes 36607850a2 Roll version 2024-12-20 19:35:47 +07:00
Wilfred Hughes b3606fc219 Use tree-sitter-xml from crates.io 2024-12-20 09:16:19 +07:00
Wilfred Hughes cef0b569dd Use tree-sitter-lua from crates.io 2024-12-20 09:12:16 +07:00
Wilfred Hughes a6eb339f71 Use tree-sitter-toml from crates.io 2024-12-20 09:07:52 +07:00
Wilfred Hughes c73b18be77 Use tree-sitter-css from crates.io 2024-12-20 09:00:04 +07:00
Wilfred Hughes 4873e87dac Use tree-sitter-html from crates.io 2024-12-20 08:55:33 +07:00
Wilfred Hughes 507b60bc45 Use tree-sitter-json from crates.io 2024-12-20 08:49:09 +07:00
Wilfred Hughes eb0b47d403 Use tree-sitter-php from crates.io 2024-12-20 08:36:36 +07:00
Wilfred Hughes f9d663ea9f Use tree-sitter-bash from crates.io 2024-12-20 08:32:54 +07:00
Wilfred Hughes 7e8974e295 Use tree-sitter-go from crates.io 2024-12-20 08:29:30 +07:00
Wilfred Hughes 15b9590db5 Use tree-sitter-julia from crates.io 2024-12-20 08:25:23 +07:00
Wilfred Hughes d2ed2f6123 Use tree-sitter-java from crates.io 2024-12-20 08:18:17 +07:00
Wilfred Hughes 80f0100c29 Switch to macos-13 runner 2024-12-20 00:16:03 +07:00
Wilfred Hughes 776d978f09 Use tree-sitter-typescript from crates.io 2024-12-20 00:09:12 +07:00
Wilfred Hughes 88731f932d Use tree-sitter-javascript from crates.io 2024-12-20 00:02:14 +07:00
Wilfred Hughes db379cf94d Use tree-sitter-c and tree-sitter-cpp from crates.io 2024-12-19 23:50:23 +07:00
Wilfred Hughes 6ea71e6983 Use tree-sitter-python from crates.io 2024-12-19 23:38:43 +07:00
Wilfred Hughes 2bbed44664 Use tree-sitter-c-sharp from crates.io 2024-12-19 23:21:26 +07:00
Wilfred Hughes de6e6707d2 Use tree-sitter-ocaml from crates.io 2024-12-19 23:14:12 +07:00
Wilfred Hughes 919f15344f Use tree-sitter-objc from crates.io 2024-12-19 23:00:43 +07:00
Wilfred Hughes 913aee1c07 Use tree-sitter-scala from crates.io 2024-12-19 22:56:33 +07:00
Wilfred Hughes b4bf322b13 Update changelog for Ruby parser 2024-12-19 22:52:26 +07:00
Wilfred Hughes bbe4890cfd Use tree-sitter-haskell from crates.io 2024-12-19 22:33:28 +07:00
Wilfred Hughes f68948ffeb Increase MSRV to 1.74.1
This will enable usage of the new tree-sitter-language crate.
2024-12-19 21:25:00 +07:00
Wilfred Hughes 3a1e398edc Improve handling of named pipe arguments
Use display_name in more places, and prefer file names with extensions
when we have two arguments.

Fixes #783
2024-11-15 23:11:25 +07:00
Wilfred Hughes 4df51dc57c Improve syntax highlighting on tree-sitter lists that are just keywords
Closes #777
2024-11-15 00:03:30 +07:00
Wilfred Hughes 549cb483fe Fix crash due to trailing newlines in string nodes at EOF
Fixes #782
2024-11-15 00:03:30 +07:00
Wilfred Hughes c2e98bb65a Roll version 2024-10-24 08:17:18 +07:00
Wilfred Hughes 870d1411a0 Link to relevant page in manual 2024-10-23 22:27:01 +07:00
Wilfred Hughes 6a5f5d6f00 Document side-by-side changes 2024-10-23 08:47:28 +07:00
Wilfred Hughes f58c9e074a Bump MSRV to 1.66 2024-10-15 23:15:07 +07:00
Wilfred Hughes 7edd2a82cd Always consider newlines when diffing lines
StringIgnoringNewline caused crashes in code that assumed that two
equal values would hav the same string length.

This reverts 86612798ad. A better
approach would be to normalise line endings before diffing, but
additionally print whether files have/lack trailing newlines.

Fixes #755
2024-10-15 08:46:34 +07:00
Wilfred Hughes 393845ddcb Change recommended git configuration
`git-difftool` has strictly less information than `git-diff`.
`git-difftool` therefore produces worse results, and we shouldn't
recommend it.

`git-difftool` does not have file rename information, and sometimes
makes difftastic claim that file permissions have changed (depending
on the permissions of the temporary directory used).

Instead, recommend `git-diff` with an external diff configured, and
update `git-mergetool` instructions to emulate `git-diff` as much as
possible (respecting $MERGED).

Also link to the upstream git bug on segfaults with external diff
tools.

Thanks to @poliorcetics and @gthb for researching this bug and
discussing possible solutions.

Closes #734
Fixes #620
2024-09-22 20:11:36 +07:00
Wilfred Hughes 53477fb46d 0.60 is released 2024-08-06 22:07:58 +07:00
Wilfred Hughes 5a51c02157 Fix crash when the last hunk includes the trailing newline at EOF
Input cleaning should happen before we diff the content, not during
display. Previously display would crash due to line numbers
referencing the line that had been stripped.

Fixes #713
Fixes #739
Fixes #742
2024-07-26 08:54:20 +07:00
Wilfred Hughes c2f4b1f2ee Update tests and changelog for 1e8be4558b 2024-07-21 11:15:54 +07:00
Wilfred Hughes 92fa3fb3de Ensure files with no common content are aligned 2024-07-20 23:43:04 +07:00
Wilfred Hughes fa2ec359d7 Roll version 2024-07-20 16:11:55 +07:00
Wilfred Hughes ffe27c575e Ensure line splitting distinguishes "foo" and "foo\n"
We rely on being able to split lines and rejoin them to obtain the
original string. `str::lines()` in the Rust stdlib does not have this
property.

This was causing crashes in word-diffing on textual diffing, where
code paths differed on the number of lines they thought a string had.

This was broken in 8b842387a1.

Fixes #688.
2024-07-20 16:09:44 +07:00
Wilfred Hughes a259c858a1 Update F# docs 2024-05-14 10:13:37 +07:00
Wilfred Hughes d292546df7 Prefer 'device tree' as two words 2024-05-13 16:59:48 +07:00
Wilfred Hughes de9c84c418 Document new addition 2024-05-13 16:52:33 +07:00
Wilfred Hughes 28d8673371 Treat tree-sitter nodes highlighted as comments as atoms
Fixes #711
2024-05-11 22:03:59 +07:00
Wilfred Hughes 835c5eb757 Roll version following release 2024-05-11 13:54:42 +07:00
Wilfred Hughes 0c9277108b It's not actually a 2x perf win
It's more like a 15% reduction in instruction count, which is still
nice.
2024-05-10 16:28:16 +07:00
Wilfred Hughes edb839c803 Improve terminal width detection
Ensure the value is always non-zero, and consider $COLUMNS if
crossterm does not succeed.

Fixes #707
2024-05-10 16:26:48 +07:00
Wilfred Hughes e23b9fc224 Update CMake parser 2024-04-28 23:53:12 +07:00
Wilfred Hughes ecaee577b2 Update Elm parser 2024-04-28 23:50:29 +07:00
Wilfred Hughes ae77a9cdf7 Document C++ parser change 2024-04-28 23:43:58 +07:00