Commit Graph

11308 Commits (88222e83c48bb191b78a8098040d55786e6268ca)
 

Author SHA1 Message Date
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 d69cc05966 Add link to magit blog post
Mentioned in #251
2022-08-17 09:41:54 +07:00
Wilfred Hughes eb0817468e Update manual for rustc bump 2022-08-12 21:51:34 +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 e1672427d3
Merge pull request #329 from fdncred/fix_windows_build
updates to support building on windows
2022-08-10 22:43:05 +07:00
Darren Schroeder 003cbb21e0 updates to support building on windows 2022-08-09 13:51:26 +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 ecd94b4e44 Treat /dev/null as an empty file on all platforms
Fixes #296
2022-08-07 18:11:17 +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 5d195bcfad Use the .entry API instead of a separate .get and .insert
This improves performance, specifically it saves up to 6.2%
instructions (on slow_before/after.rs).
2022-07-25 00:25:47 +07:00
Wilfred Hughes b9f048e87e Add newlines for clarity 2022-07-21 00:45:37 +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 97a29645f0 Ensure content_id is set before finding unique nodes 2022-07-18 22:31:30 +07:00
Wilfred Hughes bf8a20d7bb Fix typo 2022-07-18 21:48:28 +07:00
Wilfred Hughes a05535aa1c Add content_is_unique metadata to syntax nodes 2022-07-18 21:32:16 +07:00
Wilfred Hughes a4ef836b66 Add a comment explaining init_info_on_side 2022-07-18 21:20:51 +07:00
Wilfred Hughes 1d8995f04e Remove more unnecessary lifetimes 2022-07-18 21:20:38 +07:00
Wilfred Hughes a42fd4017a Remove unnecessary lifetimes 2022-07-18 21:18:19 +07:00
Wilfred Hughes 6062fda762 Clarify function name 2022-07-18 21:12:16 +07:00
Wilfred Hughes 24fa0b76a7 Remove num_after accessor
The num_after metadata is useful for prototyping A* or other heuristic
searches, but the num_after accessor is dead code in the main branch.
2022-07-17 15:56:04 +07:00
Wilfred Hughes 05782dbf5c Add num_after to Syntax
This is useful when estimating the distance to the last syntactic
node.
2022-07-12 23:16:48 +07:00
Wilfred Hughes 5b132b3da5 Silence cargo warning 2022-07-12 00:13:34 +07:00
Wilfred Hughes 3e320bb1cb Bump version number 2022-07-12 00:12:21 +07:00
Wilfred Hughes e545db85ef Remove example files from vendored SQL parser
These hit the filename length limit on Windows
2022-07-11 23:31:19 +07:00
Wilfred Hughes 374ea35876 Add symlinks for Hack parser 2022-07-11 22:58:54 +07:00
Wilfred Hughes 0dce9fcec5 Update regression tests following 38c6718c86 2022-07-11 22:14:12 +07:00
Wilfred Hughes 8547987830 Add Hacklang support 2022-07-11 22:13:37 +07:00
Wilfred Hughes 470585e7e2 Add 'vendor/tree-sitter-hack/' from commit 'b7bd6928532ada34dddb1dece4a158ab62c6e783'
git-subtree-dir: vendor/tree-sitter-hack
git-subtree-mainline: 38c6718c86
git-subtree-split: b7bd692853
2022-07-11 21:54: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 e8865905b7 Mention SQL in the manual 2022-07-11 19:28:13 +07:00
Wilfred Hughes f2ca7cf314 Add SQL support
Closes #311
2022-07-11 09:31:34 +07:00
Wilfred Hughes a9fb2638d0 Add 'vendor/tree-sitter-sql/' from commit '218b672499729ef71e4d66a949e4a1614488aeaa'
git-subtree-dir: vendor/tree-sitter-sql
git-subtree-mainline: 144f7d9e30
git-subtree-split: 218b672499
2022-07-11 09:09:33 +07:00
Wilfred Hughes 144f7d9e30 Updated TypeScript parser 2022-07-10 23:42:54 +07:00
Wilfred Hughes 1edf6c488e Merge commit '49e82b1bce36d6046df911901684cd66b5345d58' 2022-07-10 23:42:32 +07:00
Wilfred Hughes 2d0af395f9 Updated Scala parser 2022-07-10 23:39:13 +07:00
Wilfred Hughes f04d7ec4bd Merge commit '140c96cf398693189d4e50f76d19ddfcd8a018f8' 2022-07-10 23:38:53 +07:00
Wilfred Hughes 7e34d7073b Update regressio tests for new JSON upstream highlighting 2022-07-10 23:36:11 +07:00
Wilfred Hughes 5c48a7fcef Updated Ruby parser 2022-07-10 23:36:05 +07:00
Wilfred Hughes 95c2ff0deb Merge commit '5b305c3cd32db10494cedd2743de6bbe32f1a573' 2022-07-10 23:25:36 +07:00
Wilfred Hughes 91bebc3caa Updated Python parser 2022-07-10 23:24:45 +07:00
Wilfred Hughes 36f66fabd8 Merge commit 'de221eccf9a221f5b85474a553474a69b4b5784d' 2022-07-10 23:24:09 +07:00
Wilfred Hughes 15f77cb1de Updated PHP parser 2022-07-10 23:22:43 +07:00
Wilfred Hughes 0aea8019db Merge commit 'ece74b20942a5b23acaf3622512c6d0db1491a7e' 2022-07-10 23:22:23 +07:00
Wilfred Hughes 40a66f4cd4 Updated OCaml parser 2022-07-10 23:21:09 +07:00
Wilfred Hughes beacd69dd2 Merge commit 'cc26b1ef111100f26a137bcbcd39fd4e35be9a59' 2022-07-10 23:20:32 +07:00
Wilfred Hughes 548b7c1d17 Updated JSON parser 2022-07-10 23:08:29 +07:00
Wilfred Hughes 40f82151f7 Merge commit '368736a6137770f785e1e7479a6be29417eb13aa' 2022-07-10 23:08:16 +07:00