Ethan P
63ad53817d
Improved ANSI passthrough ( #1596 )
...
Improve handling of ANSI passthrough. Fix ANSI passthrough for --wrap=never. Add test for ANSI passthrough.
2021-12-08 16:06:42 +01:00
Martin Nordholts
6d0eb0749e
run-benchmarks: Benchmark both --wrap=character and --wrap=never
2021-12-08 15:45:46 +01:00
Martin Nordholts
36c1ea4599
run-benchmarks.sh: Don't benchmark startup time syntaxes twice
2021-12-08 12:02:11 +01:00
Martin Nordholts
e250da8aaa
Run cargo clippy --fix --all-targets --all-features
with Rust 1.57
...
Clippy in the newly released Rust 1.57 found some new lints. Conveniently, all
of them were fixable with `--fix`.
2021-12-08 08:45:04 +01:00
Martin Nordholts
7fceb4878f
Load themes lazily for improved startup time ( #1969 )
...
This is for #951 . Syntax lazy-loading will come later and have a much bigger
impact, but lazy-loading of themes does not have negligible impact.
2021-12-06 09:14:15 +01:00
Ersikan
29711c178a
Better syntax highlighting for Dart ( #1959 )
...
Remove unmaintained Dart syntax submodule. Add elMuso/Dartlight as submodule. Update Dart syntax highlighting. Add changes to changelog.
2021-12-06 08:40:43 +01:00
dependabot[bot]
8072d5a3e3
Bump clap from 2.33.3 to 2.34.0
...
Bumps [clap](https://github.com/clap-rs/clap ) from 2.33.3 to 2.34.0.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/commits )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-12-05 20:33:04 +01:00
D3ara1n
a5234105e5
Add a README-zh.md as the Chinese version of README.md ( #1970 )
...
Add README-zh.md to replace the outdated one. Also fix url ref.
2021-12-05 20:18:38 +01:00
Martin Nordholts
4236fa97cb
release-checklist.md: Update cargo outdated
section with link and arg
2021-12-03 09:17:32 +01:00
dependabot[bot]
f5e3d9f010
Bump predicates from 2.0.3 to 2.1.0
...
Bumps [predicates](https://github.com/assert-rs/predicates-rs ) from 2.0.3 to 2.1.0.
- [Release notes](https://github.com/assert-rs/predicates-rs/releases )
- [Changelog](https://github.com/assert-rs/predicates-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/predicates-rs/compare/v2.0.3...v2.1.0 )
---
updated-dependencies:
- dependency-name: predicates
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 06:06:54 +01:00
dependabot[bot]
6313e9ef2a
Bump assets/syntaxes/02_Extra/TOML from 0f14b7c
to 6bfcc3c
...
Bumps [assets/syntaxes/02_Extra/TOML](https://github.com/jasonwilliams/sublime_toml_highlighting ) from `0f14b7c` to `6bfcc3c`.
- [Release notes](https://github.com/jasonwilliams/sublime_toml_highlighting/releases )
- [Commits](0f14b7caf3...6bfcc3c236
)
---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/TOML
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 06:05:39 +01:00
Martin Nordholts
ce89fb2751
CICD: Add check for accidental inclusion of GPL:ed code
2021-11-28 21:04:37 +01:00
David Peter
3338699257
Remove the 'requirements.txt' syntax
...
This is needed because the syntax is only available under GPL v3.0,
which is not compatible with `bat`s license.
2021-11-28 16:28:14 +01:00
Martin Nordholts
747b15436a
run-benchmarks.sh: Add third 'Startup time' variant
...
Using Markdown for a startup test is useful since it has so many dependencies on
other syntaxes. So such a test makes sure that lazy-loading of syntaxes work.
It is however also useful to measure the startup time of bat when the time to
load a syntax is very small, and the measured startup time has mostly non-syntax
related causes. Such as:
* Parsing arguments
* Setting up syntax mapping
* Loading themes
This commit adds such a test. It uses the CpuInfo syntax which is very small.
Only 14 lines, compared to the 1581 lines that Markdown is (not including the
size of its included syntaxes).
This command can be used to get an approximation of the size of syntaxes, and
thus how expensive they are to load:
find -name *.sublime-syntax -print0 | xargs --null wc -l | sort -n -r
2021-11-27 10:39:17 +01:00
Martin Nordholts
206bf5b8d6
run-benchmarks.sh: Add new test 'Startup time with syntax highlighting'
2021-11-26 20:14:30 +01:00
Bojan Durdevic
9a2979df5f
Changelog update
2021-11-24 07:27:36 +01:00
Bojan Durdevic
b8e79a2160
Line range edge cases test
2021-11-24 07:27:36 +01:00
Bojan Durdevic
715b0d8bf5
Line range minus overflow prevention
2021-11-24 07:27:36 +01:00
Bojan Durdevic
0eb4aaac1e
Line range minus syntax clippy suggestions addressed
2021-11-24 07:27:36 +01:00
Bojan Durdevic
bc86c29185
Support for line range minus syntax
2021-11-24 07:27:36 +01:00
David Peter
d2175d6382
Add test for ANSI sequence loop-through
2021-11-23 08:14:49 +01:00
David Peter
b3aefd2d41
Add Python highlighting test
2021-11-23 08:14:49 +01:00
David Peter
f7eb55aa01
Rename jquery file
2021-11-23 08:14:49 +01:00
David Peter
5e63d67960
Remove jquery-3.3.1.min.js benchmark
2021-11-23 08:14:49 +01:00
David Peter
6fd78ea3f6
Clean benchmarking environment
2021-11-23 08:14:49 +01:00
David Peter
b12503a46a
Markdown (and JSON) reports
2021-11-23 08:14:49 +01:00
David Peter
ea2faf45e4
Simplify cargo-target-dir extraction
2021-11-23 08:14:49 +01:00
David Peter
1822c981da
Move comparison.sh benchmark script to documentation
2021-11-23 08:14:49 +01:00
Martin Nordholts
5519f9c716
Use once_cell instead of lazy_static
...
once_cell can do what lazy_static does and more, so replace lazy_static with
once_cell.
See https://docs.rs/once_cell/1.8.0/once_cell/#general-purpose-lazy-evaluation
2021-11-22 22:03:03 +01:00
Martin Nordholts
dd0925a946
Replace lazycell with once_cell
...
We started to use lazycell because syntect already used it. But syntect has
changed to use once_cell. So we should also do that to prepare for using the
upcoming version of syntect.
2021-11-22 22:03:03 +01:00
Martin Nordholts
d7671fa8e3
Remove the code related to minimal_syntaxes.bin
...
To get fast startup, syntect will instead start to lazy-load syntaxes. See
https://github.com/trishume/syntect/pull/393 and discussions in linked PRs.
2021-11-22 20:42:01 +01:00
Martin Nordholts
e79b07bf5e
HighlightingAssets::get_syntax_set(): Make private
...
Was forgotten in aefc8fd824
.
2021-11-22 20:42:01 +01:00
Shun Sakai
619cf6e6d6
Add MediaWiki syntax
2021-11-22 19:46:29 +01:00
Bojan Đurđević
d6ed5e6746
Support for ignored-suffix CLI arguments ( #1892 )
2021-11-19 17:05:23 +01:00
Isabella Basso
59d4cfb75c
README.md: Add 'Garbled output' to 'Troubleshooting' ( #1937 )
...
As per #234 , #403 , #1572 , #1823 and #1897 , this commit clarifies that
`bat` cannot properly handle escape sequences.
Signed-off-by: Isabella Basso <isabbasso@riseup.net>
2021-11-19 07:09:19 +01:00
dependabot[bot]
194e7bbcd1
Bump assets/syntaxes/02_Extra/LESS from a2eae04
to 836b47e
...
Bumps [assets/syntaxes/02_Extra/LESS](https://github.com/danro/LESS-sublime ) from `a2eae04` to `836b47e`.
- [Release notes](https://github.com/danro/LESS-sublime/releases )
- [Commits](a2eae0453e...836b47ec61
)
---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/LESS
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-11-03 06:26:21 +01:00
Michael Currin
5d92a7c591
docs: fix up README
2021-11-02 21:34:00 +01:00
dependabot[bot]
7fbe090525
Bump assert_cmd from 2.0.1 to 2.0.2
...
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd ) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases )
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v2.0.1...v2.0.2 )
---
updated-dependencies:
- dependency-name: assert_cmd
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 06:40:19 +01:00
dependabot[bot]
eaf64df4c6
Bump console from 0.14.1 to 0.15.0
...
Bumps [console](https://github.com/mitsuhiko/console ) from 0.14.1 to 0.15.0.
- [Release notes](https://github.com/mitsuhiko/console/releases )
- [Changelog](https://github.com/mitsuhiko/console/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/console/compare/0.14.1...v0.15.0 )
---
updated-dependencies:
- dependency-name: console
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 06:06:06 +01:00
dependabot[bot]
a1558fb6bf
Bump predicates from 2.0.2 to 2.0.3
...
Bumps [predicates](https://github.com/assert-rs/predicates-rs ) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/assert-rs/predicates-rs/releases )
- [Changelog](https://github.com/assert-rs/predicates-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/predicates-rs/compare/v2.0.2...v2.0.3 )
---
updated-dependencies:
- dependency-name: predicates
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 05:54:04 +01:00
dependabot[bot]
18e999c92a
Bump thiserror from 1.0.29 to 1.0.30
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.29 to 1.0.30.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.29...1.0.30 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 05:53:02 +01:00
rhysd
d5f737f402
show skip message when asset cache is not found
2021-10-26 21:34:10 +02:00
cbolgiano
7fe4fdf33d
Introduce MapExtensionToUnknown MappingTarget ( #1889 )
...
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2021-10-25 17:59:12 +02:00
David Peter
0b63ad5e8b
create_highlighted_versions: fix misleading/wrong error message
2021-10-24 12:24:46 +02:00
Martin Nordholts
4081ace4b9
Include git hash in bat -V
and bat --version
output if present
...
I had to use a `lazy_static` due to that the clap API that only accepts a
reference to a version string. And, in our code, only a 'static reference to a
version string.
Code could probably be refactored to accept a "normal" reference, but that would
be a major undertaking.
2021-10-24 11:36:55 +02:00
Martin Nordholts
dde770aa21
Add bat panic regression test for Svelte files with embedded LiveScript
...
Without a LiveScript syntax present, the Svelte test will now fail with a panic.
2021-10-23 13:35:32 +02:00
Martin Nordholts
6eb2cc9cac
Add LiveScript syntax
...
The file `LiveScript.sublime-syntax` is a pure export from a licenced version
of Sublime Text, Version 3.1.1, Build 3176 with
assets/syntaxes/02_Extra/LiveScript/Syntaxes/LiveScript.tmLanguage as the source
file.
2021-10-23 13:35:32 +02:00
rhysd
f28d9db3d0
use io::Empty instead of crafted dummy stdin struct
2021-10-23 13:04:24 +02:00
rhysd
deb80af449
remove unused lifetime parameter
2021-10-23 13:04:24 +02:00
rhysd
dc0acbbb90
inline a closure which is called only once
2021-10-23 13:04:24 +02:00