Bill Risher
6c62ed5608
revamped integration test, made CHANGELOG changes
3 years ago
Bill Risher
bf78288e9e
feat(config): added recognition of $BAT_CONFIG_DIR
3 years ago
Keith Hall
f8498b260b
Merge pull request #1793 from scop/syslog-improvements
...
Syslog highlight improvements
3 years ago
Ville Skyttä
79f08588c6
Mention syslog highlight improvements in change log
3 years ago
Ville Skyttä
2d92a4dbb3
Allow colon in syslog loghost
...
Makes it work with IPv6 addresses.
3 years ago
Ville Skyttä
f508ddf66d
Allow period in syslog loghost
...
Makes it work with FQDN's and IPv4 addresses.
3 years ago
Ville Skyttä
02218c916c
Allow period in syslog process name
3 years ago
Martin Nordholts
89217e0d58
Make --no-paging and --no-pager work again
3 years ago
Martin Nordholts
cb4973987b
Cargo.toml: Introduce 'quick-build-application' feature
...
Use it like this:
cargo build --no-default-features --features quick-build-application
It reduces dependencies to build from 154 to 125, allowing quicker iteration
when developing the app.
3 years ago
Martin Nordholts
905902d811
bin: Allow to build without bugreport
3 years ago
Martin Nordholts
c83e382eac
Cargo.toml: Only build bugreport with the app
3 years ago
Martin Nordholts
f6975e2acd
Bump bugreport to 0.4.1
3 years ago
Martin Nordholts
d8b813c0bf
When returning a SyntaxReference, also return the SyntaxSet that contains it ( #1776 )
...
To improve startup performance, we will later load smaller `SyntaxSet`s instead
of one giant one. However, the current API assumes only one `SyntaxSet` is ever used,
and that that implicitly is the `SyntaxSet` from which returned `SyntaxReference`s
comes.
This change changes the API to reflect that `SyntaxSet` and `SyntaxReference`
are tightly coupled, and enables the use of several `SyntaxSet`.
3 years ago
Martin Nordholts
5236ed135e
Fix typo in unreachable!(..) message for --wrap
3 years ago
Martin Nordholts
47d955a2ab
Add code for analyzing dependencies between syntaxes
...
And also to generate independent SyntaxSets. This will later be used
to improve bat startup time.
3 years ago
Martin Nordholts
bd797c75a4
integration_tests: Add diagnostic_sanity_check()
3 years ago
Keith Hall
05c11964fc
add patch for Python syntax to help improve performance
3 years ago
Martin Nordholts
8ecd23eab4
Make --style docs reflect that 'full' is default
...
Closes #1742
3 years ago
Martin Nordholts
1ef0206f24
CHANGELOG.md: Highlight for `vimrc` and `gvimrc` files
3 years ago
dependabot[bot]
6694aa369e
Bump assets/syntaxes/02_Extra/VimL from `7ebcaa1` to `c91fe3a`
...
Bumps [assets/syntaxes/02_Extra/VimL](https://github.com/SalGnt/Sublime-VimL ) from `7ebcaa1` to `c91fe3a`.
- [Release notes](https://github.com/SalGnt/Sublime-VimL/releases )
- [Commits](7ebcaa1d98...c91fe3ab02
)
---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/VimL
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Martin Nordholts
0331d28ee4
cargo fmt
3 years ago
Layle | Luca
51c7eb7ac1
Included LLVM syntax highlighting submodule and added regression tests
3 years ago
Keith Hall
5516bcb839
Merge pull request #1779 from sharkdp/http-request-response-syntax-update
...
Bump assets/syntaxes/02_Extra/http-request-response from f58bffe to 93b9326
3 years ago
Keith Hall
056b966501
Bump assets/syntaxes/02_Extra/http-request-response from f58bffe to 93b9326
3 years ago
Martin Nordholts
28eca6a2be
Use assert!(..) instead of assert_eq!(true, ..)
...
This fixes all of these lint warnings:
https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
They only appear in recent versions of clippy. Not on our MSRV.
3 years ago
dependabot[bot]
b7fd55242e
Bump assert_cmd from 1.0.5 to 1.0.8
...
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd ) from 1.0.5 to 1.0.8.
- [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/v1.0.5...v1.0.8 )
---
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]
8161955cc7
Bump nix from 0.21.0 to 0.22.0
...
Bumps [nix](https://github.com/nix-rust/nix ) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/nix-rust/nix/releases )
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nix-rust/nix/commits )
---
updated-dependencies:
- dependency-name: nix
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Keith Hall
3b020fd95a
Merge pull request #1771 from sharkdp/warn_when_missing_contexts
...
Warn when building assets from files if some referenced contexts are missing
3 years ago
Martin Nordholts
697d106bd4
CICD: Pass --locked to all cargo commands
...
To avoid that earlier cargo commands "fixes" Cargo.lock before cargo commands
with --locked has a chance to check if it is up to date.
3 years ago
Keith Hall
50e1c6074f
Warn when building assets from files if some referenced contexts are missing
3 years ago
Martin Nordholts
a610987ef7
assets::tests: Add get_syntax_name() helper
...
And instead of taking a get_syntax_set() detour to return a
name that represents "no syntax", return such a string directly.
3 years ago
dependabot[bot]
a7fd9f4b1b
Bump predicates from 1.0.8 to 2.0.1
...
Bumps [predicates](https://github.com/assert-rs/predicates-rs ) from 1.0.8 to 2.0.1.
- [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/v1.0.8...v2.0.1 )
---
updated-dependencies:
- dependency-name: predicates
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
5f5b77cdda
Bump semver from 0.11.0 to 1.0.4
...
Bumps [semver](https://github.com/dtolnay/semver ) from 0.11.0 to 1.0.4.
- [Release notes](https://github.com/dtolnay/semver/releases )
- [Commits](https://github.com/dtolnay/semver/compare/0.11.0...1.0.4 )
---
updated-dependencies:
- dependency-name: semver
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
83808a63be
Bump serde from 1.0.126 to 1.0.127
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.126 to 1.0.127.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.126...v1.0.127 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Keith Hall
6d5ff671e7
Add HTTP Request/Response syntax as a git submodule
3 years ago
Martin Nordholts
ffdf349a96
HighlightingAssets: Encapsulate theme_set behind a getter
...
Mainly to prepare for potential lazy-loading in the future to
improve startup performance. Like we did for syntax_set.
3 years ago
David Peter
f3d53b79a2
Update git2 dependency to fix incompatibility with Rust 1.54
3 years ago
Martin Nordholts
6acec2c074
Reduce startup time in loop-through mode with 80%-90%
...
Instead of 100 ms - 50 ms, startup takes 10 ms - 5 ms.
HighlightingAssets::get_syntax_set() is never called when e.g. piping the bat
output to a file (see Config::loop_through), so by loading the SyntaxSet only
when needed, we radically improve startup time when it is not needed.
3 years ago
Martin Nordholts
1bac3750df
HighlightingAssets: Move out fn get_integrated_*set() to module scope
...
They are just a way to get access to data embedded in the binary, so they don't
conceptually belong inside HighlightingAssets.
This has the nice side effect of getting HighlightingAssets::from_cache() and
::from_binary(), that are highly related, next to each other.
3 years ago
Martin Nordholts
b040efff79
Support a hidden arg --no-custom-assets that skips loading assets from the cache
3 years ago
Martin Nordholts
a81009607a
HighlightingAssets: Make .syntaxes() and syntax_for_file_name() failable
...
Or rather, introduce new versions of these methods and deprecate the old ones.
This is preparation to enable robust and user-friendly support for lazy-loading.
With lazy-loading, we don't know if the SyntaxSet is valid until after we try to
use it, so wherever we try to use it, we need to return a Result. See discussion
about panics in #1747 .
3 years ago
Martin Nordholts
c0e09662b4
HighlightingAssets::get_extension_syntax(): Split up into smaller methods
...
To make the code easier to understand and change.
3 years ago
Martin Nordholts
ccf4563573
Make loading of cached assets closer in performance to integrated assets
...
Using BufReader makes sense for large files, but assets are never large enough
to require buffering. It is significantly faster to load the file contents in
one go, so let's do that instead.
Closes #1753
3 years ago
David Peter
fb1ab09e3e
Add Enselic in FUNDING.yml
3 years ago
Sarvesh MD
f464b1ba39
Update battest.py
...
Add decorator test `@classmethod` and fixed spellings.
3 years ago
Frank Steffahn
2ea6348b85
Add `rs` identifier for Rust code blocks in Markdown
3 years ago
David Peter
6e536ab06d
Update CHANGELOG
3 years ago
Ville Skyttä
7537e309d8
Add groff syntax
...
The syntax is named "Man Page" upstream, but our man page syntax is
different, it's for rendered man pages. Rename to Groff and remove
`.man` from extensions.
3 years ago
David Peter
84e2a2e5d1
Add custom FUNDING.yml
3 years ago
Martin Nordholts
f6fc826dc6
HighlightingAssets: Introduce private fn new() helper
...
It already now reduces code duplication slightly, but will become even more
useful in the future when we add more complicated logic such as lazy-loading.
3 years ago