Commit Graph

7638 Commits (85f2d7aa4bf343adf8f8a4fd20a3b0cdd86556c2)
 

Author SHA1 Message Date
Wilfred Hughes 667a42d57b Downgrade to tree-sitter 0.20.0
0.20.1 has a performance regression, which seems to particularly
affect Elixir parsing:
https://github.com/tree-sitter/tree-sitter/issues/1510
2021-12-29 14:59:12 +07:00
Wilfred Hughes 9d9f55a605 Document elixir parser changes 2021-12-29 10:45:44 +07:00
Wilfred Hughes 0227104ea8 We're now on elixir-lang's parser 2021-12-29 10:36:04 +07:00
Wilfred Hughes 99429ffe87 Add 'vendor/tree-sitter-elixir/' from commit '94d6471cc8cdfaf2808f6079036ded44a308db41'
git-subtree-dir: vendor/tree-sitter-elixir
git-subtree-mainline: 99c883c898
git-subtree-split: 94d6471cc8
2021-12-28 10:29:48 +07:00
Wilfred Hughes 99c883c898 Remove old elixir parser 2021-12-28 10:29:18 +07:00
Wilfred Hughes a4888bc22a Consistent alphabetical ordering 2021-12-28 10:26:24 +07:00
Wilfred Hughes 2dde483a16 Update which files need changing for a new parser 2021-12-28 10:24:38 +07:00
Wilfred Hughes 0cf68ef847 Roll version 2021-12-27 18:28:15 +07:00
Wilfred Hughes 7cc62a3835 Update Cargo.lock for latest dependencies 2021-12-27 18:02:26 +07:00
Wilfred Hughes aec3a86a02 Use the longest file for language detection 2021-12-27 17:36:47 +07:00
Wilfred Hughes 9e3c6a7c9d Use shebang (if present) to detect language type 2021-12-27 17:33:14 +07:00
Wilfred Hughes 012019a481 Document similarities to Linguist 2021-12-27 17:20:07 +07:00
Wilfred Hughes 640cf6723b Add todo 2021-12-27 17:19:50 +07:00
Torsten Schmits 2e6acc02e3 force parser compilation before testing an example 2021-12-27 23:20:29 +07:00
Jonatan Kłosko 94d6471cc8
Fix multiline stab clause with trailing identifier (#20) 2021-12-27 22:56:00 +07:00
Wilfred Hughes 91db24fc9a Add language detection based on whole file names 2021-12-27 12:38:22 +07:00
Wilfred Hughes 35c481289a Add basic unit test for language detection by extension 2021-12-27 12:23:22 +07:00
Wilfred Hughes f6f9f16e9f Separate language detection from tree-sitter configuration 2021-12-27 12:18:46 +07:00
Wilfred Hughes 909656398e Print to stderr when reporting errors, even with debugging flags 2021-12-27 12:06:43 +07:00
Wilfred Hughes ca47e6592b Fix typo 2021-12-27 12:05:58 +07:00
Wilfred Hughes abb6bd9657 Fix needless borrows 2021-12-27 12:03:58 +07:00
Wilfred Hughes 9e3118f45d Qualify tree-sitter imports 2021-12-27 11:58:44 +07:00
Torsten Schmits e0da97b2a1 add timing info to example parsing output 2021-12-27 16:19:16 +07:00
Torsten Schmits 812426ddba scanner: replace a `when` chain with a `switch` 2021-12-27 15:54:08 +07:00
Torsten Schmits d0d7e68bf3 add mssing test target 2021-12-27 15:11:50 +07:00
Torsten Schmits 229c844252 update Cargo.toml 2021-12-27 15:10:32 +07:00
Torsten Schmits e847e17331 fail cpp on eof 2021-12-27 15:09:35 +07:00
Wilfred Hughes 6f40d54e27 Use Path arguments when we're dealing with paths 2021-12-26 10:55:38 +07:00
Wilfred Hughes 4883edd90c Factor out a DiffResult type
This separates diffing and printing better, and will make it easier to
provide a JSON output for #73.
2021-12-21 23:44:55 +07:00
Wilfred Hughes cb900c3463 Revert to term_size
Git invokes difftastic and then pipes stdout to less, but stderr still
goes to the terminal. term_size queries both stdout and stderr, so it
can still find the terminal width in this situation.

Previously, we'd always use a width of 80 when invoked by git.

terminal_size discussion:
https://github.com/eminence/terminal-size/issues/23

term_size does claim to support Windows, and #71 was not fixed by
changing libraries, so this seems reasonable.
2021-12-19 12:48:52 +07:00
Wilfred Hughes 382d498559 Fix crash when opposite side has unpaired lines
See #66
2021-12-18 23:30:16 +07:00
Wilfred Hughes 06ad384243 Document the best we can do for mercurial log viewing
Closes #61
2021-12-17 09:46:50 +07:00
Wilfred Hughes efafd817ef Reorder and polish contributing page 2021-12-17 09:39:13 +07:00
Wilfred Hughes 1fc9f3f07a Give git and mercurial their own pages in the manual 2021-12-17 09:38:09 +07:00
Wilfred Hughes 2e61df4fac Update to latest mdbook 2021-12-17 09:25:34 +07:00
Jonatan Kłosko 1b3ecf7765
Rename module highlight token (#16)
* Rename module highlight token

* Fix CRLF in scanner lookahead
2021-12-15 23:29:48 +07:00
Ryan Despain 275effdfc0
adding zsh expansion flagsSee https://zsh.sourceforge.io/Doc/Release/Expansion.html\#Parameter-Expansion-Flags (#115) 2021-12-15 08:53:04 +07:00
Wilfred Hughes 5c365c6212 cargo fmt 2021-12-11 16:02:42 +07:00
Wilfred Hughes 87a9182d3f Clarify docstring wording 2021-12-11 16:02:18 +07:00
Wilfred Hughes 447ed2c14d Fix crash on unicode characters on line boundaries
Fixes #74
2021-12-11 15:58:07 +07:00
Wilfred Hughes 740a82e6fc Note robustness in known issues
There are several crashes in the current release.
2021-12-11 14:49:26 +07:00
Wilfred Hughes 36857c3828 Allow terminal width to be overridden by DFT_WIDTH
Should help with #71.
2021-12-11 14:46:03 +07:00
Damien Guard 3104df2106
Update README.md 2021-12-09 21:13:54 +07:00
Damien Guard 3bc67196f2
Update README.md 2021-12-09 21:13:17 +07:00
Wilfred Hughes cc9f2f2d40
Fix typo 2021-12-08 00:50:51 +07:00
Wilfred Hughes 6f1baae23e Prefer terminal_width crate so we support more platforms
term_width is unmaintained and does not support Windows.

Fixes #71
2021-12-07 23:24:13 +07:00
Wilfred Hughes bffbf1b779 Document release dates 2021-12-07 23:13:46 +07:00
Wilfred Hughes d820a4ed29 Document windows build fixes 2021-12-07 23:10:07 +07:00
Wilfred Hughes 2bdd876d40 Expand example in JSX samples to test #72 2021-12-07 23:09:07 +07:00
Wilfred Hughes d417fc9ae1 Print string contents of tree-sitter leaf nodes 2021-12-07 23:09:07 +07:00