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
Wilfred Hughes
1b663c3c58
Merge commit '63528a6c247ad7f51a99c012d6e72c92f25fef6a'
2021-12-31 19:27:47 +07:00
Wilfred Hughes
52af11744f
Updated C# parser
2021-12-31 19:25:36 +07:00
Wilfred Hughes
4f64c10859
Merge commit '3104df21065af0f3d51e05a96cd0e2ff16a6f982'
2021-12-31 19:25:00 +07:00
Wilfred Hughes
f62900c241
Prefer static strings in TreeSitterParser
...
They're always string literals and this makes the `parsers` definition
more concise.
2021-12-30 19:38:35 +07:00
Wilfred Hughes
4571885605
Consider whitespace-only lines to blank for novel highlighting
2021-12-30 19:36:04 +07:00
Owen Shepherd
63528a6c24
[wip] Faster scanner ( #52 )
2021-12-30 23:26:46 +07:00
Wilfred Hughes
e2e7f0a626
Add TODO
2021-12-30 10:12:27 +07:00
Wilfred Hughes
426a95c552
Document C/C++ parser updates
2021-12-30 10:07:43 +07:00
Wilfred Hughes
6d6847247b
Merge commit 'e8dcc9d2b404c542fd236ea5f7208f90be8a6e89'
2021-12-30 10:06:32 +07:00
Wilfred Hughes
2325d0027e
Merge commit 'e348e8ec5efd3aac020020e4af53d2ff18f393a9'
2021-12-30 10:04:50 +07:00
Wilfred Hughes
3381a3dc60
Document bash parser update
2021-12-30 10:02:14 +07:00
Wilfred Hughes
a58e62876b
Merge commit '275effdfc0edce774acf7d481f9ea195c6c403cd'
2021-12-30 10:00:21 +07:00
Wilfred Hughes
6257bce826
Document the string literal problem
...
Closes #69
2021-12-30 09:58:56 +07:00
Wilfred Hughes
9a8441ecbf
Document blank line challenges
...
See #69
2021-12-30 09:47:44 +07:00
Wilfred Hughes
2d16d4aec4
Clarify comment prefix/suffix matching
2021-12-30 09:39:00 +07:00
Wilfred Hughes
24bbff1bbe
Improve headings
2021-12-30 09:37:16 +07:00
Wilfred Hughes
b5aaf1f2f2
Document punctuation from autoformatter challenge
...
See #69
2021-12-30 09:35:34 +07:00
Wilfred Hughes
177db1f652
Improve highlighting of blank lines in novel sections
...
If we're displaying a blank line and there's no opposite line, assume
it's novel and needs highlighting.
This is a best-effort heuristic, but it seems to work well.
2021-12-29 16:44:14 +07:00
Wilfred Hughes
9c2886cd4d
Factor out highlight position calculations
2021-12-29 16:25:42 +07:00
Wilfred Hughes
f78fdd3bc7
Add a very simplistic test for single column display
2021-12-29 16:08:23 +07:00
Wilfred Hughes
1469fe6385
Add a basic test for display width calculations
2021-12-29 16:05:46 +07:00
Wilfred Hughes
581d1696dd
Factor out a helper function for novel line highlighting
2021-12-29 16:04:36 +07:00