Commit Graph

200 Commits (f1bd8703822c095a6ffccc443d669ccbc6b7390f)

Author SHA1 Message Date
Wilfred Hughes 7827a059cb Update F# expected output 2024-05-25 14:58:14 +07:00
Wilfred Hughes d92b65c5fd Merge remote-tracking branch 'thecentury/f#' 2024-05-14 09:46:55 +07:00
Wilfred Hughes d292546df7 Prefer 'device tree' as two words 2024-05-13 16:59:48 +07:00
Wilfred Hughes d3e5aa5232 Merge remote-tracking branch 'blmaier/support-devicetree' 2024-05-13 16:50:13 +07:00
Wilfred Hughes 28d8673371 Treat tree-sitter nodes highlighted as comments as atoms
Fixes #711
2024-05-11 22:03:59 +07:00
Wilfred Hughes e51834fa77 Support comment.foo highlighting queries
This should improve highlighting in cases like Elm that use
`@comment.elm`.
2024-05-11 16:08:29 +07:00
Wilfred Hughes 5c40cd0282 Prefer _1 and _2 naming for test files
This is less to type, and it's now alphabetical, so e.g.
sample_files/*.kt just works as a test argument.
2024-04-28 23:28:06 +07:00
Wilfred Hughes 2e016566ac Update CSS parser 2024-04-28 21:45:25 +07:00
Wilfred Hughes 38f148df1f Don't flatten error nodes
As of b9d44ae65f (released in 0.38), difftastic prefers a textual
diff if any parse errors are present. As a result, users have to
opt-in to allowing parse errors. We can now preserve structure to
produce diffs that are more granular, at the slight risk of changes
being missed if parsers discard tokens.

Fixes #703
2024-04-28 17:28:34 +07:00
Wilfred Hughes 3be8e80fe7 Fix issue with later lines not having positions during diffing 2024-03-19 00:25:18 +07:00
Wilfred Hughes b78f7d447b Always replace tabs, even in single-column display
Fixes #617
2024-03-04 21:38:23 +07:00
Wilfred Hughes 7ddd8879b1 Merge branch 'scheme-support' of github.com:kutsurak/difftastic into kutsurak-scheme-support 2024-03-04 08:46:59 +07:00
Wilfred Hughes 53298e4240 Set a length limit on lines when doing a word diff
See #653
2024-02-29 00:54:55 +07:00
Brandon Maier e6b27caf06 Add support for devicetrees 2024-02-28 17:11:53 +07:00
Wilfred Hughes 7a00339977
Merge pull request #634 from evanrichter/smali
Smali language support
2024-02-19 11:57:54 +07:00
Wilfred Hughes 4fef3f7b00 Update regression test for QML parser 2024-02-15 23:40:56 +07:00
Wilfred Hughes e70224bb22 Update regression tests for new JS/TS parsers 2024-02-15 08:30:57 +07:00
Panagiotis Koutsourakis 67ada1ccd4 Add support for Scheme 2024-02-12 10:20:57 +07:00
Evan Richter d106c979ee add smali language support 2024-02-01 15:41:14 +07:00
Mikhail Brinchuk 297fa952c2
Merge branch 'Wilfred:master' into f# 2024-01-29 11:45:31 +07:00
Wilfred Hughes a3731067b2
Merge pull request #618 from arbrauns/tree-sitter-vhdl
Add tree-sitter-vhdl
2024-01-28 12:04:53 +07:00
Wilfred Hughes 6c4310e33b Remove macro from Objective-C sample file so it parses fully 2024-01-28 11:02:58 +07:00
Mikhail Brinchuk 9a894d5369 Added a regression test for F# 2024-01-28 12:36:13 +07:00
Armin Brauns c5638750d6 Add tree-sitter-vhdl 2024-01-09 09:23:51 +07:00
Wilfred Hughes 5c67ed08a9 Update integration test for new tab width 2024-01-07 19:26:07 +07:00
Wilfred Hughes db86b28a28 Add support for Objective-C
Closes #600

Co-authored-by: Nick Moore <nick@pilotmoon.com>
2024-01-07 12:50:19 +07:00
Wilfred Hughes db0c150f61 Report permission changes
Fixes #605
2023-12-30 11:20:00 +07:00
Wilfred Hughes 001279a2e1 Update expected output test 2023-12-08 21:51:29 +07:00
Rodolphe Blancho e18b5d0712
Merge branch 'master' into feature/salesforce_apex_support 2023-12-05 12:31:59 +07:00
Wilfred Hughes 569f0038d1 Always filter blank lines at start and end in positions
Fixes #595
2023-11-28 12:35:28 +07:00
Wilfred Hughes 8a58fb76ab Update regression test for SCSS capitalisation change 2023-11-25 01:20:31 +07:00
Wilfred Hughes fe62cf4cf5 Don't ignore novel blank lines
Fixes #575
2023-11-18 17:27:41 +07:00
Wilfred Hughes 778a6bee9a Flatten nullable types in Kotlin
Workaround for #589 and #411
2023-10-26 08:56:37 +07:00
Wilfred Hughes 81714c17ce
Merge pull request #573 from brneor/scss
Add Scss parser
2023-10-11 08:57:58 +07:00
Rodolphe Blancho 05d78ca741 add support for Salesforce Apex
Apex Language documentation:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm

Uses https://github.com/aheber/tree-sitter-sfapex
2023-10-06 11:08:02 +07:00
Wilfred Hughes 992437db1d Show the language name when parsing fails 2023-09-28 00:33:49 +07:00
Breno Reis fffbc17adc
add regression test for SCSS 2023-09-20 14:38:35 +07:00
Wilfred Hughes 8ebd6317d1 Add XML test file 2023-09-12 13:05:15 +07:00
Wilfred Hughes 1e7866b64e Do word diffing on text too 2023-09-12 13:03:27 +07:00
Wilfred Hughes d56f775f31 Highlight constructors consistently with type names 2023-09-03 01:30:22 +07:00
Wilfred Hughes fac4f3082b Update snapshot tests for new Rust parser 2023-08-18 23:07:54 +07:00
Wilfred Hughes 0af76db498 Update regression tests for humansize file formatting 2023-08-13 09:10:16 +07:00
Wilfred Hughes 757c297412 Adjust header style
Show the hunk count and detected language in a dimmed style. This
information is less important than the diff content itself, so this
change makes the important information more prominent.

First part of #544
2023-07-31 08:35:27 +07:00
Wilfred Hughes 797af40ae8 Improve Java highlighting 2023-07-27 08:33:38 +07:00
Wilfred Hughes 7caaaf7fcf Handle nested sliders correctly when preferring the outer delimiter
Previously we didn't check the state of children, which was an
oversight from the original implementation. As a result, we fixed
nested sliders in fewer situations.

Fixes #535
2023-07-14 08:49:55 +07:00
Wilfred Hughes 5606c04261 Treat qualified modules and variables as atoms in Haskell 2023-07-12 12:34:39 +07:00
Wilfred Hughes a814e01d22 Improve word diffing heuristic and add another sample file 2023-07-12 12:12:32 +07:00
Wilfred Hughes c2b7042b80 Do subword highlighting in more cases
This is useful when two strings substantially differ, but have the
same e.g. end.
2023-07-10 21:26:24 +07:00
Wilfred Hughes 5824322244 Require some common words to do subword highlighting
This is important when comparing short string literals. This change
has improved several cases in sample_files/ but I've added a new
example that made the previous unwanted behaviour much more obvious.
2023-07-10 09:03:21 +07:00
Wilfred Hughes 27f59c0b3a Don't treat - as a word constituent
This produces slightly better results with some string replacements.
2023-07-08 17:16:14 +07:00