Wilfred Hughes
2d4ab5e494
Treat ocaml tags as atoms too
2022-01-15 11:00:41 +07:00
Wilfred Hughes
f7626ba249
cargo fmt
2022-01-15 10:27:53 +07:00
Wilfred Hughes
c7b12d202f
Treat ocaml type variables as an atom
...
The `'` in `'foo` gets a separate tree-sitter AST node, but the `foo`
does not. Treat the whole thing as an atom to avoid missing
highlighting on the `foo` part.
Fixes #89
2022-01-14 23:35:19 +07:00
Wilfred Hughes
e404c0e86f
Ensure we only calculate opposite positions once
...
Previously this was computed per-hunk, which was wasteful and slow
when there are many hunks.
2022-01-14 09:48:40 +07:00
Wilfred Hughes
eeafbe681a
Detect PKGBUILD and other common shell files
...
Fixes #95
2022-01-13 23:06:31 +07:00
Wilfred Hughes
6a5e777e4c
Remove obsolete comments
2022-01-13 22:59:30 +07:00
Wilfred Hughes
ca7c509da1
Clarify name for predicate function
2022-01-13 09:19:13 +07:00
Wilfred Hughes
8c6559ba81
Treat bash heredocs as atoms
...
Fixes #93
2022-01-11 19:14:04 +07:00
Wilfred Hughes
d68b6d5909
Expanding related projects page in manual
2022-01-10 16:37:23 +07:00
Wilfred Hughes
6ad40e10c4
Trim whitespace in JSX text
...
Fixes #72
2022-01-09 18:47:24 +07:00
Wilfred Hughes
79281ea98d
Add glossary
...
Closes #87
2022-01-09 12:06:20 +07:00
Wilfred Hughes
d240bfeebd
Fix Mercurial when whole file has been removed
...
Mercurial gives us the path even when it doesn't exist. Just require
at least one of the paths to exist, rather than both.
(Git gives us /dev/null in this situation.)
Fixes #50
2022-01-07 09:42:56 +07:00
Wilfred Hughes
71d357b92e
Set the hashmap size for a very minor perf win
...
This takes my test file from 5.8 to 5.7 seconds. It's not much, but it
doesn't hurt.
2022-01-06 01:34:50 +07:00
Wilfred Hughes
758a9b474a
Add TODO
2022-01-06 01:28:30 +07:00
Wilfred Hughes
a11e3081b2
Roll version
2022-01-06 01:00:48 +07:00
Wilfred Hughes
c511b634f7
Only split source code on newlines once
...
Widths::new() is called once per hunk, so repeatedly splitting on
newlines can become a major performance bottleneck.
2022-01-06 00:54:52 +07:00
Wilfred Hughes
2f8a82de15
Document new textual differ
...
See #86
2022-01-06 00:54:05 +07:00
Wilfred Hughes
027856d707
Adding a line-based textual differ that ignores trees
2022-01-05 09:39:19 +07:00
Wilfred Hughes
b1793703fb
Use .info() helper rather than manually destructuring
2022-01-04 19:06:05 +07:00
Wilfred Hughes
1d1eedf7a5
Don't store a position tuple in MatchedPos
2022-01-04 19:01:21 +07:00
Wilfred Hughes
c7c6f1a7b6
Print a newline on binary files, consistent with other files
2022-01-03 23:56:34 +07:00
Wilfred Hughes
654a49bc0c
cargo fmt
2022-01-03 21:47:17 +07:00
Wilfred Hughes
40e23e4026
Improve alignment when the last line is novel
2022-01-03 12:43:43 +07:00
Wilfred Hughes
10b1c2cbcb
Docstring formatting
2022-01-03 11:49:10 +07:00
Wilfred Hughes
a3a72eb630
Function does not need to be public
2022-01-03 11:18:07 +07:00
Wilfred Hughes
c17c57a9bc
Add a test for aligning lines from a hunk
2022-01-03 11:12:21 +07:00
Wilfred Hughes
5ba4b6eadb
Calculate opposite positions inside aligned_lines_from_hunk
...
This simplifies the API with no downside.
2022-01-03 11:06:40 +07:00
Wilfred Hughes
8aca2d3f3c
Simplify line splitting logic and improve docstring
2022-01-03 09:40:16 +07:00
Wilfred Hughes
4ac1fb1818
Expand text sample file
2022-01-02 19:18:19 +07:00
Wilfred Hughes
4396979e72
Handle trailing newlines when splitting lines
2022-01-02 19:14:00 +07:00
Wilfred Hughes
626046b12d
Redundant parens
2022-01-02 18:35:13 +07:00
Wilfred Hughes
05be21d08e
Fix typo in changelog
2022-01-01 20:28:45 +07:00
Wilfred Hughes
dd2a6639a2
Add sample file for text
2022-01-01 19:56:58 +07:00
Wilfred Hughes
2e3f0d26a0
Add some defensive assertions
2022-01-01 19:31:34 +07:00
Wilfred Hughes
44668a10bc
Ensure cost is always non-zero
...
This is a minor perf hit (.2% more instructions on slow_after.rs) but
easier to reason about.
2022-01-01 17:50:36 +07:00
Wilfred Hughes
6f9f9da18d
Clarify NovelTree cost logic
...
The descendants counts atoms, so use the atom cost explicitly. This
isn't a numerical change but it's clearer.
2022-01-01 17:27:10 +07:00
Wilfred Hughes
0c10541bfc
Remove spurious TODO
...
As long as the subtraced amount is less than NOVEL_TREE_THRESHOLD, it
will not overflow.
2022-01-01 17:26:05 +07:00
Wilfred Hughes
077ded6081
Add TODO
2022-01-01 15:52:18 +07:00
Wilfred Hughes
83c21d6aac
Add TODO
2021-12-31 19:47:26 +07:00
Wilfred Hughes
2dc480ec5c
Updated typescript parser
2021-12-31 19:40:14 +07:00
Wilfred Hughes
2fc2b0f64f
Merge commit '111b07762e86efab9a918b7c721f720c37e76b0a'
2021-12-31 19:39:47 +07:00
Wilfred Hughes
ba15ce8103
Updated Ruby parser
2021-12-31 19:39:22 +07:00
Wilfred Hughes
a510c77411
Merge commit '888e2e563ed3b43c417f17e57f7e29c39ce9aeea'
2021-12-31 19:37:32 +07:00
Wilfred Hughes
efa8313e39
Update Python parser
2021-12-31 19:36:13 +07:00
Wilfred Hughes
6c8eebbc06
Merge commit '24b530ca158d2782ea9046e756057a412e16b52f'
2021-12-31 19:35:51 +07:00
Wilfred Hughes
13bf9f7f42
Update OCaml parser
2021-12-31 19:34:05 +07:00
Wilfred Hughes
2cda301a71
Merge commit '23d419ba45789c5a47d31448061557716b02750a'
2021-12-31 19:33:23 +07:00
Wilfred Hughes
5e8c116a3c
Updated Java parser
2021-12-31 19:31:48 +07:00
Wilfred Hughes
5ea1edd32a
Merge commit 'ed3a87f750b1d1d533f15ab93fef3e1f5a46e234'
2021-12-31 19:31:22 +07:00
Wilfred Hughes
75b29947b3
Updated Haskell parser
2021-12-31 19:31:11 +07:00