Wilfred Hughes
2d4ec0a4be
Bump minimum Rust version to 1.56 for rpds support
2022-03-05 10:42:52 +07:00
Wilfred Hughes
4b674d4b8e
Use rpds rather than im for persistent data types
...
rpds is actively maintained and it's even a significant performance
win in my testing (40% time reduction on slow_before.rs).
2022-03-04 21:47:05 +07:00
Wilfred Hughes
efc59360cc
Add a debugging option to disable the skip_unchanged logic
2022-03-04 09:45:25 +07:00
Wilfred Hughes
25433a0c3d
Only consider novel trees at the top level
...
Helps with #148 . On my machine this changes slow_after.rs from 4.4 to
3.4 seconds, but only reduced instruction count from 12.8B to 10.4B.
The one changed case in sample_files/ is more granular and more
readable.
2022-03-02 22:55:22 +07:00
Wilfred Hughes
0fb5525902
Tweak wording of motto
2022-02-28 21:03:07 +07:00
Wilfred Hughes
cb0f1f3fe5
Roll version
2022-02-28 09:26:26 +07:00
Michael Davis
459ff49e91
Generate parser
2022-02-28 02:49:55 +07:00
Michael Davis
ce6ee5195b
add visibility_modifier and opacity_modifier rules ( #18 )
...
closes #17
This refactor brings this grammar more in line with tree-sitter-rust.
A function or type declaration may have a visibility modifier ("pub") and
type declarations may also have an opacity modifier ("opaque"). This ends
up reducing the number of named rules, which cleans up the queries a bit.
2022-02-27 21:49:32 +07:00
Wilfred Hughes
128bad9ac9
Fix typo
2022-02-26 11:47:30 +07:00
Jonathan Arnett
cfcbca3f8f
Correct name from "type_constructor" to "data_constructor" ( #16 )
2022-02-26 12:20:54 +07:00
Michael Davis
5cb387020c
add tags.scm queries ( #15 )
2022-02-26 12:16:25 +07:00
Wilfred Hughes
78d4d59c0c
Documenting some recently found tricky cases
2022-02-25 00:43:18 +07:00
Wilfred Hughes
75bca2bc57
Fix more clippy warnings
2022-02-24 20:49:11 +07:00
Wilfred Hughes
0905fb74c3
Simplify usage of regression test suite
2022-02-24 20:35:36 +07:00
Wilfred Hughes
4f942c3e36
Support Emacs mode headers on the second line too
2022-02-24 20:21:07 +07:00
Wilfred Hughes
c3721c228f
cargo fmt
2022-02-24 20:15:32 +07:00
Jonathan Arnett
0b8f7bcae9
Move corpus/ under test/
2022-02-24 18:48:31 +07:00
Wilfred Hughes
ea7d6b7257
Fix Unicode handling in word splitting
2022-02-24 09:36:51 +07:00
Wilfred Hughes
3aa9a48b25
Parse Emacs file headers when doing language detection
...
Fixes #145
2022-02-23 22:51:52 +07:00
Wilfred Hughes
72dd4f5e6d
Fix a styling crash introduced in 76d014898
...
Also add a test so we spot this before the regression tests.
2022-02-22 09:53:28 +07:00
Wilfred Hughes
6408fada47
Update comment for new variable name
2022-02-22 09:44:10 +07:00
Wilfred Hughes
76d0148980
Remove redundant if statement
2022-02-21 19:57:39 +07:00
Wilfred Hughes
af7faa48ac
Clarify variable names
2022-02-21 19:53:40 +07:00
Wilfred Hughes
562c215a06
Fix crash when a line-wrapped line has no styles
...
Fixes #142
2022-02-21 19:44:20 +07:00
Wilfred Hughes
382aa936e6
Add doc comment
2022-02-21 19:24:00 +07:00
Wilfred Hughes
1687e7358b
Unit test for styling text with trailing unstyled text
2022-02-21 19:16:41 +07:00
Wilfred Hughes
2a80459209
Add unit test for applying a style to the whole string
2022-02-21 19:15:30 +07:00
Wilfred Hughes
9128d15ea1
Add unit test for highlighting when styles are missing
2022-02-21 19:12:46 +07:00
Wilfred Hughes
f1063bd1e7
Ensure we consider all unchanged nodes for calculating alignment
...
Fixes #141
2022-02-20 22:41:29 +07:00
Wilfred Hughes
8a7d05d5e5
Document why LHS and RHS parents are compared separately
2022-02-20 21:52:37 +07:00
Wilfred Hughes
8d050f9588
Set locale to try to fix glob order on GitHub actions
2022-02-20 21:42:47 +07:00
Wilfred Hughes
52aaea4418
Try checking output on GH actions
2022-02-20 20:28:37 +07:00
Wilfred Hughes
54fd04a7e2
Ensure regression test always uses the same width
2022-02-20 20:28:06 +07:00
Wilfred Hughes
ca55c7ee2c
Update integration test expectation following 7544874a5
2022-02-20 20:25:49 +07:00
Wilfred Hughes
d8e8e12bf8
Roll version
2022-02-20 16:50:05 +07:00
Wilfred Hughes
b0e835feb6
Document the release script
2022-02-20 16:48:58 +07:00
Wilfred Hughes
c8378dd589
Clarify how many items in the path we're logging
2022-02-20 15:54:01 +07:00
Wilfred Hughes
157fbf23a9
Add environment variable for debugging side-by-side printing
2022-02-20 15:51:11 +07:00
Wilfred Hughes
e4b2094860
Replace .next and .next_if_same_layer with .next_sibling
...
This is the case we want now, and it's a simpler API to reason about.
2022-02-20 14:41:23 +07:00
Wilfred Hughes
e4021bd38a
Disable regression test on CI
2022-02-20 13:16:22 +07:00
Wilfred Hughes
e32ba0eb16
Improve edge names
2022-02-20 13:15:00 +07:00
Wilfred Hughes
33d4ac1162
Check regression test output
2022-02-20 13:09:29 +07:00
Wilfred Hughes
cbef056a3f
Fix build after removing field on Unchanged edges
2022-02-20 13:08:50 +07:00
Wilfred Hughes
d3afd5d40a
Run regression test in CI
2022-02-20 12:59:46 +07:00
Wilfred Hughes
eea5bb7273
Remove unused import
2022-02-20 12:54:25 +07:00
Wilfred Hughes
7544874a55
Tracking depth difference is no longer necessary
...
Tracking parents is a better solution
2022-02-20 12:52:46 +07:00
Wilfred Hughes
82890923cd
Track entering/leaving parents explicitly
...
This produces significantly better diffs, and fixes some cases that
were outright wrong before.
Fixes #30
2022-02-20 12:43:52 +07:00
Wilfred Hughes
692f08f1f1
Merge hunks when lines are adjacent
2022-02-19 16:12:04 +07:00
Wilfred Hughes
0973f65899
cargo fmt
2022-02-19 14:51:15 +07:00
Wilfred Hughes
63673c799b
Increment i consistently before asserting it's non-zero
2022-02-19 11:04:19 +07:00