Commit Graph

107 Commits (663590a3b218e34861d3d4714a9f8e3e6f53bd42)

Author SHA1 Message Date
Mateusz Radomski 663590a3b2 Atomize hex and unicode string literals in Solidity
Without this, changes inside these string types are not taken into
consideration when performing the diff.
2024-10-02 08:18:40 +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 809f49124c Remove empty comment 2024-05-11 22:10:17 +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 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 7ddd8879b1 Merge branch 'scheme-support' of github.com:kutsurak/difftastic into kutsurak-scheme-support 2024-03-04 08:46:59 +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 bf047030d2 Add a unit tests that validates that all language configs are valid 2024-02-15 08:47:58 +07:00
Panagiotis Koutsourakis 67ada1ccd4 Add support for Scheme 2024-02-12 10:20:57 +07:00
Wilfred Hughes cd65d48619 Silence a clippy warning 2024-02-08 08:40:47 +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
Mikhail Brinchuk 045344f783 Fixed rust format 2024-01-28 12:52:07 +07:00
Mikhail Brinchuk 0e4723cf0e Added F# support 2024-01-28 12:11:53 +07:00
Armin Brauns c5638750d6 Add tree-sitter-vhdl 2024-01-09 09:23:51 +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 5d2a4777dc Simlify pattern matches 2023-12-29 19:47:17 +07:00
Wilfred Hughes c180fb52a9 Treat strict types in Haskell as atoms
This isn't ideal: it prevents a finegrained diff of syntax within a type, but it
beats claiming that the code is unchanged.

Fixes #607
2023-12-28 19:24:35 +07:00
Wilfred Hughes 26c58a25e8 Treat regex literals as atoms in Clojure 2023-12-17 10:46:15 +07:00
Rodolphe Blancho e18b5d0712
Merge branch 'master' into feature/salesforce_apex_support 2023-12-05 12:31:59 +07:00
Wilfred Hughes cac80e992a Avoid `res` locals in favour of more meaningful names 2023-11-28 13:27:27 +07:00
Wilfred Hughes 1ec868e1df Update to latest line-numbers 2023-11-19 13:11:07 +07:00
Wilfred Hughes f2b3b34bec Use pub(crate) everywhere for visibility
This isn't strictly necessary since difftastic is a binary-only
crate. However, it improves compiler warnings (see next commit) and
potentially helps future changes to make difftastic available as a
library.
2023-11-18 16:46:13 +07:00
Wilfred Hughes 778a6bee9a Flatten nullable types in Kotlin
Workaround for #589 and #411
2023-10-26 08:56:37 +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
Breno Reis 1bffcf4e2b
add support for SCSS 2023-09-20 14:26:43 +07:00
Wilfred Hughes aeb974ba7e Add TODO 2023-09-15 16:06:44 +07:00
Wilfred Hughes 1e7866b64e Do word diffing on text too 2023-09-12 13:03:27 +07:00
Wilfred Hughes 243a4a5f48 Group imports consistently
This corresponds to:

$ cargo +nightly fmt -- --config group_imports=StdExternalCrate

Since this option is only available on nightly, I'm not adding a
rustfmt.toml to enforce this, just doing it as a one-off run.
2023-09-12 12:32:51 +07:00
Wilfred Hughes 8731a1b908 Fix rustdoc warnings 2023-09-12 12:21:43 +07:00
Wilfred Hughes 004a0da67f Flatten modifiers in C# to improve highlighting 2023-09-08 23:44:11 +07:00
Wilfred Hughes 9134593a39 Add XML support
Fixes #10
2023-09-08 23:43:20 +07:00
Wilfred Hughes d56f775f31 Highlight constructors consistently with type names 2023-09-03 01:30:22 +07:00
Wilfred Hughes b78ba2da4b Use type names from line_numbers directly 2023-08-26 20:36:07 +07:00
Wilfred Hughes 41c9165c79 Use my line_numbers crate for newline position calculations 2023-08-26 16:25:32 +07:00
Wilfred Hughes 797af40ae8 Improve Java highlighting 2023-07-27 08:33:38 +07:00
Wilfred Hughes 685a2ef8d5 Merge remote-tracking branch 'grunweg/master' 2023-07-20 22:41:56 +07:00
Wilfred Hughes a5d3cb55b7 Treat constructors consistently with variables in Haskell atoms 2023-07-12 17:34:42 +07:00
Wilfred Hughes 8614910fe2 cargo fmt 2023-07-12 16:45:58 +07:00
Wilfred Hughes 5606c04261 Treat qualified modules and variables as atoms in Haskell 2023-07-12 12:34:39 +07:00
Wilfred Hughes 8eb949eb02 Use DftHashMap everywhere
This is a 4% reduction in instructions for typing_before.ml, but a
0.2% increase instructions for slow_before.rs. This seems like a win
overall, and it also keeps the codebase more consistent and simpler.
2023-07-09 15:41:01 +07:00
Wilfred Hughes 9eb48ca661 Configure comments as atoms in latest scala parser 2023-06-12 22:28:01 +07:00
Wilfred Hughes 893b56b6b1 Consistent casing 2023-05-14 00:56:45 +07:00
Wilfred Hughes e37a6b2087 Improve naming and ordering of JSX/TSX languages 2023-05-14 00:54:58 +07:00
Mike Grunweg 7984b7a59e Audit node types with children: none should be treated as atoms. 2023-05-05 22:45:53 +07:00