Wilfred Hughes
d775b1f56a
Roll version
2021-08-15 11:14:45 +07:00
Wilfred Hughes
4243f9fb2b
Move comment to extras to simpify main sexp rules
2021-08-15 11:08:25 +07:00
Wilfred Hughes
25d2bcd9cd
Add reamde and npm run scripts
2021-08-15 11:04:34 +07:00
Wilfred Hughes
409b9f70b5
Specify author and repo
2021-08-15 10:34:56 +07:00
Wilfred Hughes
00ab8947d3
Configuring tests on GH actions
2021-08-15 10:18:05 +07:00
sogaiu
39bf0977d2
Update README
2021-08-15 13:16:31 +07:00
Wilfred Hughes
01f453ab81
Add tests for numeric literals and get them passing
2021-08-14 19:30:53 +07:00
Wilfred Hughes
8242420766
Add a basic list test
2021-08-14 19:24:45 +07:00
Wilfred Hughes
7dcb8d19df
Allow symbols to start with & e.g. &optional
2021-08-14 19:22:10 +07:00
Wilfred Hughes
503e67d8b8
Support unquote splicing
2021-08-14 19:21:17 +07:00
Wilfred Hughes
cdab4a34a5
Parse characters too
2021-08-14 19:19:40 +07:00
Wilfred Hughes
978e76b940
Parse INF and NaN
2021-08-14 19:17:12 +07:00
Wilfred Hughes
fbd2a54e3c
Float literals
2021-08-14 19:14:50 +07:00
Wilfred Hughes
05ba9caff0
Integer literals
2021-08-14 19:08:27 +07:00
Wilfred Hughes
28ff4a87fc
Use tree-sitter's whitespace handling
...
It already provides `extras` which ignores all whitespace.
2021-08-14 18:59:34 +07:00
Wilfred Hughes
306729609e
Don't treat sexp as a named item in the grammar
2021-08-14 18:50:10 +07:00
Wilfred Hughes
d2ef69d84c
Regenerate C code
2021-08-14 18:49:19 +07:00
Wilfred Hughes
90b83c161d
Configure scope and file types
2021-08-14 18:47:55 +07:00
Wilfred Hughes
b1c824c64d
Support parsing vector literals
2021-08-14 18:43:26 +07:00
Wilfred Hughes
452db999d4
Expand symbol and add 'foo, #'foo, and `,foo support
2021-08-14 18:27:42 +07:00
Wilfred Hughes
d9309ff78f
Initial lispy grammar
2021-08-14 18:19:29 +07:00
Wilfred Hughes
527257d017
Generate C code with tree-sitter CLI
2021-08-14 17:52:54 +07:00
Wilfred Hughes
052698677b
Define a skeleton grammar
2021-08-14 17:52:13 +07:00
Wilfred Hughes
90592b25c3
Initial commit
2021-08-14 17:47:34 +07:00
Martin Jambon
bc2eb3994f
Merge pull request #189 from FnControlOption/destructuring-to-new-variable-with-default-value
...
Fix destructuring assignment to new variable with default value
2021-08-13 14:29:43 +07:00
FnControlOption
cdab6a974e
Fix destructuring assignment to new variable with default value
2021-08-13 08:33:48 +07:00
Wilfred Hughes
70ee1b736e
Fix off-by-one that breaks empty positions at file beginning
2021-08-12 18:33:26 +07:00
Wilfred Hughes
997a2cfb8e
Prefer immutable syntax references
...
It's fine to have mutable aliases when allocating Syntax nodes, but it
triggers clippy lints and forces us to use more explicit type
annotations.
All the data we want to mutate is behind a cell anyway, so prefer the
immutable form.
2021-08-12 18:02:55 +07:00
sogaiu
a8710b87e6
Update README
2021-08-12 20:49:55 +07:00
Wilfred Hughes
330026e6a3
Fix off-by-one in padding calculations
...
Interval is exclusive of `end`, so add 1 to the last line when
initialising.
2021-08-11 23:28:29 +07:00
Wilfred Hughes
e693bffe87
Make column number placeholders more precise
...
Previously we'd always show . for the first unaligned line if it was
the first line in a hunk.
2021-08-11 22:37:37 +07:00
Wilfred Hughes
15110f928f
Store open and close in unchanged positions
2021-08-11 22:26:49 +07:00
Wilfred Hughes
414182c9dd
Only show a single column in side-by-side when adding a whole file
2021-08-08 23:25:26 +07:00
Wilfred Hughes
09a80150df
Fix adding/removing whole files
...
The 'remove unaligned lines at beginning of hunk' logic meant we just
discarded the whole hunk.
This breaks alignment again (previously fixed in 3ebbf268fd ), but that
should be fixed properly in the padding logic.
2021-08-08 23:15:23 +07:00
Wilfred Hughes
15be123b20
Ensure LineGroup does not iterate over extra lines
2021-08-08 22:46:09 +07:00
Wilfred Hughes
2ff7d38ac2
Make clippy happier
2021-08-08 22:26:04 +07:00
Wilfred Hughes
f56ca49747
Pass LineGroup directly to aligned_lines
2021-08-08 20:45:15 +07:00
Wilfred Hughes
3ae0b7df84
Allow RHS to be arbitrarily long in a pager
...
If stdout is not a TTY, assume it's a pager and don't truncate the
RHS.
2021-08-08 17:35:31 +07:00
Wilfred Hughes
857cb77d8f
Ensure LHS and RHS source code are the same width
2021-08-08 17:31:18 +07:00
Wilfred Hughes
83b8c843cb
Use .. for column numbers on blank lines used to align
2021-08-08 11:26:17 +07:00
Wilfred Hughes
ac63677127
Move format_line_num_padded to side_by_side as it's only used there
2021-08-08 11:08:15 +07:00
Wilfred Hughes
1de7c10a56
Fix column number alignments in inline diff mode
2021-08-08 00:43:18 +07:00
Wilfred Hughes
2a905e28bc
Allow storing opposite position on unchanged comment parts
2021-08-08 00:04:05 +07:00
Wilfred Hughes
42425532c7
Use reversed positions after computing them
2021-08-07 16:40:32 +07:00
Wilfred Hughes
bbb0f2fcba
Store opposite position on unchanged matched positions
2021-08-07 16:14:16 +07:00
Wilfred Hughes
3a1e34160f
Fix typo
2021-08-07 13:28:55 +07:00
Wilfred Hughes
98e02f2d9d
Move side-by-side logic from lines.rs to side_by_side.rs
2021-08-07 12:27:57 +07:00
Wilfred Hughes
d07b97a3ec
More inline diff context fixes
2021-08-04 23:49:07 +07:00
Wilfred Hughes
a7063c97c7
Allow copying and/or cloning of match information
2021-08-04 23:48:45 +07:00
Wilfred Hughes
2dcb265d76
Inline diff: correct line number for RHS trailing context
2021-08-04 23:40:03 +07:00