Commit Graph

397 Commits (fe30b7d86b478a0f9baaca9ca2f29d566d5bab97)

Author SHA1 Message Date
Wilfred Hughes fe30b7d86b Treat .zip files as binary unconditionally
Improves #358
2022-09-10 12:22:58 +07:00
Yuya Nishihara 84f0b25fb6 Add support for QML
QML is a UI language, and its syntax is basically JSON-like structure
+ JavaScript. The tree-sitter parser is named after the upstream grammar
file qmljs.g, but the canonical language name is QML. So I choose Qml as
the Language enum.

https://doc.qt.io/qt-6/qmlapplications.html
2022-09-10 11:38:35 +07:00
Wilfred Hughes fe5ef8757d Give novel punctuation a lower edge cost
We'd rather see an unchanged variable name than an unchanged comma.

Fixes #366
2022-09-09 09:47:53 +07:00
Wilfred Hughes 9695d0009e Mention slider fix in changelog 2022-09-02 18:35:04 +07:00
Wilfred Hughes e15244c8f6 Roll version 2022-09-02 18:24:08 +07:00
Wilfred Hughes 5b866f8db3 Fix extensions for language detection with Makefile syntax 2022-09-02 11:42:28 +07:00
Wilfred Hughes fd571c98a7 Add a --list-languages option
Fixes #292
2022-09-02 11:41:05 +07:00
Wilfred Hughes 40dfd9eb29 Fix typo in .workflow extension name 2022-09-02 11:26:40 +07:00
Wilfred Hughes a04f867557 Fix terminal width detection
This was previously fixed in
cb900c3463 (see commit message), but
broken in #341.

Instead, use both term_size and terminal_size, to maximise our chances
that we can detect the width. Also comment the code with the relevant
terminal_size issue.

Fixes #346
2022-09-02 11:07:48 +07:00
Wilfred Hughes 8ff572d615 Copy crates.io note from the release info on 0.28 2022-09-01 09:18:32 +07:00
Wilfred Hughes 659f2dd6bd Add support for Makefiles 2022-08-28 16:26:01 +07:00
Wilfred Hughes b1b3756fa7 Attempt to detect and decode UTF-16 files too
Closes #345
2022-08-28 15:38:57 +07:00
Wilfred Hughes 1d1d883a9b Roll version 2022-08-27 23:00:33 +07:00
Wilfred Hughes a247218811 Set +whole-archive on C/C++ libraries
This fixes the build for Rust 1.61+ on some machines. I can reliably
reproduce this locally, but CI does not exhibit this issue (I'm not
sure why).

The Rust compatibility notes document this change:
https://github.com/rust-lang/rust/blob/1.61.0/RELEASES.md#compatibility-notes

and eventually this will be supported by cc:
https://github.com/rust-lang/cc-rs/pull/671

Fixes #339
2022-08-27 17:28:04 +07:00
Wilfred Hughes 09334030ab Fix incorrect line number being used in side-by-side display
Fixes #334
2022-08-22 09:34:34 +07:00
Wilfred Hughes f3420df1ca Roll version 2022-08-21 22:05:04 +07:00
Wilfred Hughes c957818514 Explore two graph nodes for each parenthesis position
This produces substantially better diff results, and fixes the 'last
item in the list shown as changed' problem.

This can produce slower diffing. typing_before.ml takes 10% more
instructions and slow_before.rs takes 110% more instructions.
2022-08-21 16:34:17 +07:00
Wilfred Hughes 515932151f Merge branch 'cmake' 2022-08-20 18:36:07 +07:00
Wilfred Hughes bbdc324b7f Add CMake support
Fixes #333
2022-08-20 18:32:32 +07:00
Wilfred Hughes 58c8f47298 Also consider highlights.scm when marking nodes as comments
This removes the need to special-case Perl, and is necessary for
CMake (which has nodes bracket_comment and line_comment that aren't
marked as 'extra').
2022-08-20 18:28:07 +07:00
Wilfred Hughes fb38e7a24f Always use the RHS for language detection
Taking the longest path breaks if we have e.g. /dev/null and foo.py,
because foo.py is shorter.
2022-08-18 23:00:15 +07:00
Wilfred Hughes 01cce54978 Fix path display when called from git with two arguments
Fixes #332
2022-08-18 23:00:13 +07:00
Wilfred Hughes 5fe6d551d9 Always use the RHS for language detection
Taking the longest path breaks if we have e.g. /dev/null and foo.py,
because foo.py is shorter.
2022-08-18 22:58:43 +07:00
Wilfred Hughes 040dd3b0e2 Fix path display when called from git with two arguments
Fixes #332
2022-08-18 09:34:14 +07:00
Wilfred Hughes 6ce0717447 Note the newer rustc requirement 2022-08-12 12:39:00 +07:00
Wilfred Hughes a5aa433277 Mention #329 in the changelog 2022-08-12 12:25:02 +07:00
Wilfred Hughes 0c03187b96 Roll version 2022-08-07 18:16:16 +07:00
Wilfred Hughes f028389393 Update changelog for last commit 2022-08-07 18:13:04 +07:00
Wilfred Hughes 5d93efa51a Document Elm support in the manual and changelog
This was added in 0.26.
2022-08-02 09:15:11 +07:00
Wilfred Hughes bc283341f3 Use unique subtrees shared between LHS/RHS to determine similar lists
This makes the 'lists are sufficiently similar' heuristic more
aggressive. Previously we'd look for lists with common start or end
children and the same delimiters.

This worked badly for cases like:

LHS: (novel-lhs (a b c d e))
RHS: (novel-rhs (a b c d e))

Instead, look for sublists that are unique on both sides and occur on
both the LHS and RHS root being considered. This allows us to match up
many more cases.

Consider lists to be sufficiently similar exclusiely using this
(surprisingly effective) heuristic, and don't consider outer
delimiters.

This substantially improves performance in many cases, particularly
for files that are fairly flat (many toplevel lists with little
nesting).

Fixes #306
2022-07-19 21:58:37 +07:00
Wilfred Hughes 3e320bb1cb Bump version number 2022-07-12 00:12:21 +07:00
Wilfred Hughes 8547987830 Add Hacklang support 2022-07-11 22:13:37 +07:00
Wilfred Hughes 38c6718c86 Improve handling of /dev/null paths when there are two CLI argsuments
When git calls us, we always know the file name. If we're called with
two arguments and one is /dev/null, use the other for language
detection and display.
2022-07-11 21:41:04 +07:00
Wilfred Hughes f2ca7cf314 Add SQL support
Closes #311
2022-07-11 09:31:34 +07:00
Wilfred Hughes 144f7d9e30 Updated TypeScript parser 2022-07-10 23:42:54 +07:00
Wilfred Hughes 2d0af395f9 Updated Scala parser 2022-07-10 23:39:13 +07:00
Wilfred Hughes 5c48a7fcef Updated Ruby parser 2022-07-10 23:36:05 +07:00
Wilfred Hughes 91bebc3caa Updated Python parser 2022-07-10 23:24:45 +07:00
Wilfred Hughes 15f77cb1de Updated PHP parser 2022-07-10 23:22:43 +07:00
Wilfred Hughes 40a66f4cd4 Updated OCaml parser 2022-07-10 23:21:09 +07:00
Wilfred Hughes 548b7c1d17 Updated JSON parser 2022-07-10 23:08:29 +07:00
Wilfred Hughes ecff4f8036 Updated Java 2022-07-10 23:06:25 +07:00
Wilfred Hughes 9e1744bf02 Updated HCL parser 2022-07-10 23:04:12 +07:00
Wilfred Hughes 18078a0e37 Updated Haskell parser 2022-07-10 23:00:55 +07:00
Wilfred Hughes c5a5555862 Update Gleam parser 2022-07-10 22:58:50 +07:00
Wilfred Hughes dead5e8a8a Update changelog for Elm parser bump 2022-07-10 22:49:01 +07:00
Wilfred Hughes 6b3d8e24f6 Updated Dart parser too 2022-07-10 22:43:38 +07:00
Wilfred Hughes cc4501c645 Document the C# parser update 2022-07-10 22:31:04 +07:00
Wilfred Hughes 2071517621 Fix duplicate newlines in inline display mode
Fixes #314
2022-07-10 20:28:42 +07:00
Wilfred Hughes 0e7ab02741 Mention syntax highlighting fixes in last release
Introduced by d785886294
2022-07-04 20:07:49 +07:00