Commit Graph

8581 Commits (e472acb8050e84c671470421f4fd5c74a9d3b2bd)
 

Author SHA1 Message Date
Wilfred Hughes e472acb805 Add a --language option to override language detection
Fixes #199
2022-04-01 23:10:48 +07:00
Wilfred Hughes e3d91d6dcc Move header checks out of from_extension 2022-04-01 22:24:12 +07:00
Wilfred Hughes 97b9a13d15 Expose a proper `--display` CLI option
This helps with discovery of the different display options available,
such as inline (see #34).
2022-04-01 22:15:24 +07:00
Wilfred Hughes e9992a60f4 Clarify the limitations of patch files
See also #186.
2022-04-01 09:38:08 +07:00
Wilfred Hughes 16d5d2350d Clarify wording 2022-04-01 09:30:07 +07:00
Wilfred Hughes 1f8b6fe377 Mention the minimum GCC version following #187 2022-04-01 09:24:16 +07:00
Wilfred Hughes bef93e9626 Roll version 2022-03-31 09:47:58 +07:00
Wilfred Hughes 299c321e72 Treat interpolated strings as atoms in PHP
This makes diffing slightly less useful for large strings, but it's
consistent with the other languages.
2022-03-31 09:34:03 +07:00
Wilfred Hughes a1ec5e88e8 Fix side-by-side display when source contains CRLF
Fixes #212
2022-03-31 09:32:21 +07:00
Wilfred Hughes 8d44b2476a Expand 'Adding a parser' as a separate chapter in the manual 2022-03-30 23:58:50 +07:00
Wilfred Hughes 1593de4208 Remove redundant parentheses 2022-03-30 23:35:44 +07:00
Wilfred Hughes 559d0f9b6b Fix Java delimiters `[` and `]` 2022-03-30 23:23:44 +07:00
Wilfred Hughes c4c05fdde5 Prefer a single language list, in the manual
It's easy for these to get out of sync.
2022-03-30 22:50:17 +07:00
Wilfred Hughes e653b77194 Hack is not currently supported 2022-03-30 22:46:40 +07:00
Wilfred Hughes 5703f75568 Don't assume that lines end with newlines
Previously we would crash if the last line in a file had no trailing
newline and ended with a multibyte character.

Closes #217
2022-03-30 22:42:17 +07:00
Wilfred Hughes ff37192918 Update changelog for last commit 2022-03-30 20:56:12 +07:00
Dmitry Marakasov 9fc437216c Make --color affect missing line number formatting
Fixes #213
2022-03-30 20:55:23 +07:00
Wilfred Hughes ce076a142b Tweak formatting in README
Half the sentence being bold looks untidy.
2022-03-30 20:54:37 +07:00
Wilfred Hughes d1c25576ba
Merge pull request #206 from mjul/patch-1
Fix "she-bang" typo
2022-03-30 09:11:22 +07:00
Martin Jul 4747517039
Fix "she-bang" typo
This makes the test correct in case the full rule of only recognizing an Emacs mode line on the second line if the first line is a "she-bang" line is ever fully implemented.
2022-03-30 09:57:37 +07:00
Wilfred Hughes 5116c69afe Make installation instructions more prominent 2022-03-29 23:22:33 +07:00
Wilfred Hughes 16ecf15867 Mention prebuilt packages and expand build instructions
Fixes #202
2022-03-29 23:20:22 +07:00
Wilfred Hughes 3c84538253 Escape newlines in --dump-ts when the node kind is '\n'
--dump-ts is only intended as a debugging feature, but it's a little
confusing when newlines aren't escaped.

Fixes #203
2022-03-29 22:51:38 +07:00
Wilfred Hughes ecdf993ff1 Add support for Nix
Closes #196
2022-03-29 22:46:09 +07:00
Wilfred Hughes 641ba87416 Add 'vendor/tree-sitter-nix/' from commit '470b15a60520ff7b86f51732b8d8f1118c86041e'
git-subtree-dir: vendor/tree-sitter-nix
git-subtree-mainline: df5c044259
git-subtree-split: 470b15a605
2022-03-29 22:22:45 +07:00
Wilfred Hughes df5c044259
Merge pull request #188 from JafarAbdi/pr-add_lua_parser
Add lua support
2022-03-29 22:08:16 +07:00
Jafar eb29b824c3
Merge branch 'master' into pr-add_lua_parser 2022-03-30 06:23:20 +07:00
JafarAbdi b850d41fa5 Add lua support 2022-03-30 06:21:10 +07:00
Wilfred Hughes 646ab39cbb Mention that Janet is supported 2022-03-29 19:50:25 +07:00
Wilfred Hughes 48cf4ece6d
Merge pull request #190 from sogaiu/janet-subtree
Add Janet support
2022-03-29 19:32:44 +07:00
Wilfred Hughes 9ee7991bda
Merge pull request #198 from felixonmars/patch-1
Correct a typo in tricky_cases.md
2022-03-29 19:26:34 +07:00
Felix Yan d92cb9633f
Correct a typo in tricky_cases.md 2022-03-30 02:23:07 +07:00
sogaiu e1e735752d Add sample files and update compare.expected 2022-03-29 14:53:10 +07:00
Wilfred Hughes d36224229e Downgrade rpds to last Rust 2018 version
This will allow difftastic to build on earlier rust versions, and is
also a ~2% instruction count reduction on slow_before.rs.
2022-03-28 22:23:42 +07:00
sogaiu 5696ef6016 Change name shown to users 2022-03-29 14:20:23 +07:00
sogaiu 9ed951044a Format via cargo fmt 2022-03-29 14:14:07 +07:00
sogaiu 5ecc0fbde5 Add janet support 2022-03-29 10:22:14 +07:00
sogaiu 4b397024cb Add 'vendor/tree-sitter-janet-simple/' from commit 'e6c04e4b243cf3e5aca8f201e48926a72cc18334'
git-subtree-dir: vendor/tree-sitter-janet-simple
git-subtree-mainline: f26ca24df7
git-subtree-split: e6c04e4b24
2022-03-29 10:12:42 +07:00
sogaiu e6c04e4b24 Release 0.0.3 2022-03-29 10:00:03 +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
sogaiu 784a9afca5 Add comment-handling to highlights.scm 2022-03-28 16:13:21 +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
sogaiu aceea17420 Add queries/highlights.scm 2022-03-28 15:17:45 +07:00
sogaiu 12e2b7a0fa Fix rust binding 2022-03-28 15:17:29 +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