JafarAbdi
b850d41fa5
Add lua support
2022-03-30 06:21:10 +07:00
JafarAbdi
02fd04189c
Add 'vendor/tree-sitter-lua/' from commit '6f5d40190ec8a0aa8c8410699353d820f4f7d7a6'
...
git-subtree-dir: vendor/tree-sitter-lua
git-subtree-mainline: f26ca24df7
git-subtree-split: 6f5d40190e
2022-03-28 18:07:10 +07:00
Wilfred Hughes
f26ca24df7
Discard '\n' nodes in C and C++
...
These are from the preprocessor grammar rules, but they're not useful
for difftastic.
Reported upstream: https://github.com/tree-sitter/tree-sitter-c/issues/97
Closes #180
2022-03-27 23:37:23 +07:00
Wilfred Hughes
a189f49a5e
Return a vec of syntax nodes when converting tree-sitter to difftastic
2022-03-27 23:19:56 +07:00
Wilfred Hughes
065a11ee2c
Clarify textual diffing approach
2022-03-27 18:43:31 +07:00
Wilfred Hughes
b66bb9ea96
Group debug options in help text
2022-03-27 00:01:55 +07:00
Wilfred Hughes
ced7708426
Tweak wording as --background doesn't take a colour argument
2022-03-26 23:54:12 +07:00
Wilfred Hughes
b6cd8c9a42
Update Clojure highlighting to match upstreamed PR
...
See https://github.com/sogaiu/tree-sitter-clojure/pull/20
2022-03-26 23:50:55 +07:00
Wilfred Hughes
ec2b72bff2
Update regression tests for previous commit
2022-03-26 23:50:33 +07:00
Wilfred Hughes
1d7324c2dc
Clarify wording when a parsed file has no changes at all
2022-03-26 23:31:12 +07:00
Wilfred Hughes
92b9680ecd
Define a scala.scm of highlighting queries
2022-03-26 23:26:21 +07:00
Wilfred Hughes
5b1bc62ac6
Don't show hunk numbers when there's only one hunk
...
Related: #60
2022-03-26 22:52:04 +07:00
Wilfred Hughes
bacefe5a58
Roll version
2022-03-26 16:02:51 +07:00
Wilfred Hughes
c15ba1e75a
New screenshots and add screencast demo
2022-03-26 15:46:41 +07:00
Wilfred Hughes
1a8d7d06a7
Store previous_sibling in SyntaxInfo
2022-03-24 21:57:13 +07:00
Wilfred Hughes
59ee169ddc
Remove leftover debug logging
2022-03-24 21:27:27 +07:00
Wilfred Hughes
807be70e31
Factor out a helper function for splitting unchanged singleton lists
2022-03-24 21:20:46 +07:00
Wilfred Hughes
870806c017
Log the number of toplevel nodes too
...
This is computationally cheaper than calculating depth, and it gives a
good hint regarding depth (fewer toplevel nodes: depth is probably
deeper).
Fixes #159
2022-03-23 22:59:39 +07:00
Wilfred Hughes
2b36a755f0
Ensure that blank lines in multiline strings are shown as changed
...
Fixes #121
2022-03-23 22:47:17 +07:00
Wilfred Hughes
886c0964ff
Treat shebangs in dart as atoms
...
E.g. given:
#! /usr/bin/env dshell
tree-sitter AST doesn't have positions for the `/usr/bin/env dshell`
part, so treat it all as an atom.
2022-03-23 22:13:45 +07:00
Wilfred Hughes
f15ec6d637
Lower the default node limit for tree diffing
...
Fixes #176
2022-03-22 21:15:54 +07:00
Wilfred Hughes
4647112e93
Define a highlighting file for Clojure
...
This isn't provided upstream, and the parse tree doesn't have a lot of
information, but we can at least handle string literals and keywords.
2022-03-22 21:08:46 +07:00
Wilfred Hughes
c9c3582871
Print incrementally when diffing directories
...
Fixes #170
2022-03-22 09:51:23 +07:00
Wilfred Hughes
503c8b26ec
Fix tests broken in 9e32e2e08
...
The changes in context.rs were intentional, the changes in
line_parser.rs were a result of bad stash merging. Revert the
line_parser.rs changes.
2022-03-21 23:55:32 +07:00
Wilfred Hughes
fa4a662645
Fix typo and clarify VCS
2022-03-20 22:32:49 +07:00
Wilfred Hughes
9e32e2e08e
Ensure matched lines includes blanks at the ends of the file
...
Fixes #163
2022-03-20 22:31:32 +07:00
Wilfred Hughes
905fc9ec8b
Ignore the trailing newline in source files
...
This should have produced a change in output, but it's currently
ignored due to #163 .
2022-03-20 22:26:44 +07:00
Wilfred Hughes
c7795111f5
cargo fmt
2022-03-20 21:30:17 +07:00
Wilfred Hughes
68f3ab2b92
Don't consider lines with whitespace to have missing syntax
...
Fixes #171
2022-03-20 19:49:13 +07:00
Wilfred Hughes
4563648a9f
Clarify ChangeKind helper method name
2022-03-20 15:17:32 +07:00
Wilfred Hughes
12ee2c7673
Warn if both arguments are the same path
...
Fixes #164
2022-03-20 15:14:14 +07:00
Wilfred Hughes
2fd48800c7
Update changelog for previous commit
2022-03-20 15:06:13 +07:00
Wilfred Hughes
a18dce036a
Handle novel MatchedPos values that have unchanged values on the same line
...
Fixes #169
2022-03-20 15:03:22 +07:00
Wilfred Hughes
e2d1a80235
Merge branch 'osa1-dart'
...
Closes #166
2022-03-20 11:41:10 +07:00
Wilfred Hughes
049a213a82
Add dart-src symlink
2022-03-20 11:37:05 +07:00
Wilfred Hughes
29050f00ce
Configure language and fix highlighting for dart
2022-03-20 11:36:12 +07:00
Wilfred Hughes
b60ab25850
Add 'vendor/tree-sitter-dart/' from commit '6a25376685d1d47968c2cef06d4db8d84a70025e'
...
git-subtree-dir: vendor/tree-sitter-dart
git-subtree-mainline: 0c53a6bcf8
git-subtree-split: 6a25376685
2022-03-20 11:14:48 +07:00
Wilfred Hughes
0c53a6bcf8
Remove copied files
2022-03-20 11:14:33 +07:00
Ömer Sinan Ağacan
fb73c84960
Add a Dart sample
2022-03-20 11:07:39 +07:00
Ömer Sinan Ağacan
0b7e00e517
Copy tree-sitter-dart files
2022-03-20 11:07:39 +07:00
Ömer Sinan Ağacan
1e77e540a9
Remove submodule
2022-03-20 11:07:39 +07:00
Ömer Sinan Ağacan
a2488f984c
Add support for Dart
2022-03-20 11:07:32 +07:00
Ömer Sinan Ağacan
b8c7ce2398
Add tree-sitter-dart repo
2022-03-20 11:06:53 +07:00
Wilfred Hughes
bb1f1e9ad7
Prefer Iterator::next() over incrementing an index
2022-03-20 11:00:56 +07:00
Wilfred Hughes
3dc193ed0c
Tweak badge styles
2022-03-19 12:44:42 +07:00
Wilfred Hughes
9435798c9c
Next release will be 0.24
2022-03-19 10:27:04 +07:00
Wilfred Hughes
06ffa0267a
Next release will be a patch release with a single crash fix
2022-03-19 10:24:30 +07:00
Wilfred Hughes
d06f357c93
Fix crash when outer delimiters are discarded when skipping unchanged
...
If we skip some nodes inside a list whose delimiters are unchanged, we
need to mark the outer list as unchanged.
Split ChangeState::Unchanged into UnchangedNode and UnchangedDelimiter
to make this clearer, and add a test.
2022-03-18 16:00:05 +07:00
Wilfred Hughes
6d3b1ffbdd
Update test names to reflect current function names
2022-03-18 15:35:04 +07:00
Wilfred Hughes
038463d0e4
Add Debug for ChangeState to help debugging
2022-03-18 13:26:39 +07:00