Wilfred Hughes
c0ba12bf68
Add a --width CLI argument
2022-01-29 12:13:21 +07:00
Wilfred Hughes
d37a233b39
Use clap for parsing dump-syntax and dump-ts options
2022-01-29 12:10:35 +07:00
Wilfred Hughes
d0fce4c42f
Add a unit test for clap args configuration
2022-01-29 11:14:06 +07:00
Wilfred Hughes
934be78573
Fix clap deprecation warnings
2022-01-29 11:06:44 +07:00
Wilfred Hughes
5a2e0379aa
Update to clap 3
2022-01-29 11:01:36 +07:00
Wilfred Hughes
4d8d258837
Clarify argument names
2022-01-29 10:28:18 +07:00
Wilfred Hughes
64deb7eff0
Dim .. ellipses that signify an absent line
2022-01-27 22:37:30 +07:00
Wilfred Hughes
98ccc6e2d9
Prefer bold over bright terminal colours
...
Bright colours work well on dark terminals, but not on light
terminals.
2022-01-27 22:24:47 +07:00
Wilfred Hughes
fca1c6fffe
Prefer 'normal' over white foreground colours
...
This is important in terminals with white backgrounds.
Improves #55
2022-01-27 22:18:06 +07:00
Wilfred Hughes
1b907e84c1
Fix character literals in Lisp
...
Improves #85
2022-01-27 21:53:21 +07:00
Wilfred Hughes
5cf143228f
Treat attribute IDs in OCaml as atoms
...
Fixes #114
2022-01-27 20:25:17 +07:00
Wilfred Hughes
bde1009825
Factor out a line tuple comparison helper
2022-01-26 22:38:46 +07:00
Wilfred Hughes
bf5d9b6192
Print header on every hunk in inline display
...
See #34
2022-01-26 22:05:52 +07:00
Wilfred Hughes
6fb800606e
Get all matched lines and then slice
...
This is much simpler conceptually and less prone to bugs.
Fixes #111
2022-01-26 21:58:02 +07:00
Wilfred Hughes
cb510375c1
Show ChangedCommentPart in bold
2022-01-25 22:55:30 +07:00
Wilfred Hughes
69dbad35ad
Roll version
2022-01-25 22:32:18 +07:00
Wilfred Hughes
e123cad49e
Only set next/prev on potentially changed syntax nodes
...
Otherwise we end up running dijkstra on nodes at the end that we've
already marked as unchanged, and erroneously claim they're novel.
Fixes #112
2022-01-25 22:29:19 +07:00
Wilfred Hughes
440c94ce3c
Don't treat identical text files as binary
...
Looks like a copy-paste mistake.
2022-01-24 20:34:34 +07:00
Wilfred Hughes
1a26441c52
Adjust syntax highlighting colours
...
Blue is a little dark in some dark themes, meaning the contrast is
sometimes too low.
Closes #108
2022-01-24 19:39:46 +07:00
Wilfred Hughes
af52cc060f
Suggest a pager and an alias with difftool
...
Suggested in #29
2022-01-24 09:29:18 +07:00
Wilfred Hughes
10ff7d0a82
Don't dim unstyled text
...
There doesn't seem to be a visual difference (at least in my
terminal), and we should probably never dim content we're showing to
the user.
2022-01-23 12:25:53 +07:00
Wilfred Hughes
5b2f348dfa
Highlight novel type atoms as bold too
...
This makes highlighting consistent across changed/unchanged lines.
2022-01-23 12:20:29 +07:00
Wilfred Hughes
f053529f76
Use bold for highlighting types too
...
Too many colours makes it harder to spot the red/green changed
sections, but it's nice seeing types distinctly.
This is probably the limit of syntax highlighting possible within the
current design, so consider #32 done for the time being.
Fixes #32
2022-01-23 11:56:27 +07:00
Wilfred Hughes
d594901d29
Factor out a struct for tracking highlighting IDs
2022-01-23 11:38:37 +07:00
Wilfred Hughes
a5de97a63c
Add syntax highlighting for strings
...
Improves #32 .
2022-01-23 11:27:29 +07:00
Wilfred Hughes
637eee8ff1
cargo fmt
2022-01-23 11:13:20 +07:00
Wilfred Hughes
e63eb43c7b
Tweak variable names
2022-01-23 11:13:05 +07:00
Wilfred Hughes
6ff60bf0c5
Add syntax highlighting on comments
...
Improves #32
2022-01-23 11:07:16 +07:00
Wilfred Hughes
119217e900
Factor out error highlighting as an explicit helper
2022-01-23 10:58:31 +07:00
Wilfred Hughes
28440a2a29
Display changed delimiters in bold
...
This is really helpful when changing a small part of a larger
expression, where only a single delimiter has changed.
2022-01-23 10:49:42 +07:00
Wilfred Hughes
ff52941131
Remove duplicate style calculation logic
2022-01-22 22:50:24 +07:00
Wilfred Hughes
94e968b660
Ignore unchanged nodes at the start/end of the file
...
This is the first part of #84 .
2022-01-22 22:26:52 +07:00
Wilfred Hughes
a2dc0b5109
Roll version
2022-01-22 19:03:58 +07:00
Wilfred Hughes
4e33a0c4bc
Add a benchmarking example of a larger file
2022-01-22 18:59:32 +07:00
Wilfred Hughes
fb680ccdb3
Document diffing directories
...
Also add sample directories to exercise this.
Helps with #98 .
2022-01-22 18:58:04 +07:00
Wilfred Hughes
61c79839e3
Ensure we always include the first and last hunk line
...
Fixes #90
2022-01-22 18:46:55 +07:00
Wilfred Hughes
f33c88a274
Remove leftover dbg!
2022-01-22 17:58:27 +07:00
Wilfred Hughes
de89caadb3
Don't consider newlines to be words in the line parser
...
This causes us to match up unrelated lines, and doesn't make sense for
a line parser.
Improves #90 .
2022-01-22 17:56:12 +07:00
Wilfred Hughes
e060ab31bf
Fix another bug with duplicate line printing
...
hunk_end needs flipping when operating on the mirror image, as well as
the output.
2022-01-22 17:16:23 +07:00
Wilfred Hughes
e2bf7741a0
Fix .max_line() when source has a trailing newline
...
Fixes a crash when testing #90 against trunk.
2022-01-22 13:40:12 +07:00
Wilfred Hughes
504221b908
Fix lint warning
2022-01-22 13:19:14 +07:00
Wilfred Hughes
cb7122c937
Take an opposite line whenver possible when matching novel regions
...
Fixes #99
2022-01-22 13:16:33 +07:00
Wilfred Hughes
68d60f076c
Fix wording in manual
2022-01-22 11:26:55 +07:00
Wilfred Hughes
f9ac4411f5
Clarify unique_id semantics
2022-01-22 11:22:49 +07:00
Wilfred Hughes
c1b08f8e46
cargo fmt
2022-01-21 22:10:39 +07:00
Wilfred Hughes
b88ed07dc2
Update changelog
2022-01-21 21:42:34 +07:00
Wilfred Hughes
b30f203c99
Merge branch 'faster_dijkstra'
2022-01-21 21:40:19 +07:00
Wilfred Hughes
3548c32a4c
Fix sliders after diffing
...
Fixes #35
2022-01-21 21:39:02 +07:00
Wilfred Hughes
6df0d12c3e
Add accessor for node change
2022-01-20 23:26:17 +07:00
Wilfred Hughes
d0c15f6cd2
Add TODO
2022-01-20 23:13:06 +07:00