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`.
3 years ago
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.
3 years ago
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.
3 years ago
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>
3 years ago
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.
3 years ago
Martin Nordholts
4236fa97cb
release-checklist.md: Update `cargo outdated` section with link and arg
3 years ago
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>
3 years ago
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>
3 years ago
Martin Nordholts
ce89fb2751
CICD: Add check for accidental inclusion of GPL:ed code
3 years ago
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.
3 years ago
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
3 years ago
Martin Nordholts
206bf5b8d6
run-benchmarks.sh: Add new test 'Startup time with syntax highlighting'
3 years ago
Bojan Durdevic
9a2979df5f
Changelog update
3 years ago
Bojan Durdevic
b8e79a2160
Line range edge cases test
3 years ago
Bojan Durdevic
715b0d8bf5
Line range minus overflow prevention
3 years ago
Bojan Durdevic
0eb4aaac1e
Line range minus syntax clippy suggestions addressed
3 years ago
Bojan Durdevic
bc86c29185
Support for line range minus syntax
3 years ago
David Peter
d2175d6382
Add test for ANSI sequence loop-through
3 years ago
David Peter
b3aefd2d41
Add Python highlighting test
3 years ago
David Peter
f7eb55aa01
Rename jquery file
3 years ago
David Peter
5e63d67960
Remove jquery-3.3.1.min.js benchmark
3 years ago
David Peter
6fd78ea3f6
Clean benchmarking environment
3 years ago
David Peter
b12503a46a
Markdown (and JSON) reports
3 years ago
David Peter
ea2faf45e4
Simplify cargo-target-dir extraction
3 years ago
David Peter
1822c981da
Move comparison.sh benchmark script to documentation
3 years ago
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
3 years ago
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.
3 years ago
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.
3 years ago
Martin Nordholts
e79b07bf5e
HighlightingAssets::get_syntax_set(): Make private
...
Was forgotten in aefc8fd824
.
3 years ago
Shun Sakai
619cf6e6d6
Add MediaWiki syntax
3 years ago
Bojan Đurđević
d6ed5e6746
Support for ignored-suffix CLI arguments ( #1892 )
3 years ago
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>
3 years ago
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>
3 years ago
Michael Currin
5d92a7c591
docs: fix up README
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
rhysd
d5f737f402
show skip message when asset cache is not found
3 years ago
cbolgiano
7fe4fdf33d
Introduce MapExtensionToUnknown MappingTarget ( #1889 )
...
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
David Peter
0b63ad5e8b
create_highlighted_versions: fix misleading/wrong error message
3 years ago
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.
3 years ago
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.
3 years ago
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.
3 years ago
rhysd
f28d9db3d0
use io::Empty instead of crafted dummy stdin struct
3 years ago
rhysd
deb80af449
remove unused lifetime parameter
3 years ago
rhysd
dc0acbbb90
inline a closure which is called only once
3 years ago
rhysd
92ba42a602
do not take stdin lock when stdin is not used
3 years ago
Ashutosh Sajan
d5e61d2316
update ubuntu installation command ( #1911 )
3 years ago
rhysd
ed3246c423
Make grep-cli optional dependency
3 years ago