Commit Graph

166 Commits (156dec2737db4759f41a30650cfe938de3c65d5c)

Author SHA1 Message Date
Rashil Gandhi 43afae34be
Add PowerShell completion file (#1826) 3 years ago
Martin Nordholts 19c3e82abf
Replace deprecated 'error-chain' with 'thiserror' (#1820)
We can't use #[from] on Error::Msg(String) because String does not implement Error.
(Which it shouldn't; see e.g. https://internals.rust-lang.org/t/impl-error-for-string/8881.)
So we implement From manually for Error::Msg, since our current code was written
in that way for error-chain.
3 years ago
Martin Nordholts f1c0fd7343
Don't take a HighlightingAssets detour to build assets (#1802)
Move code to build assets to its own file. That results in better modularity and flexibility.

It also allows us to simplify HighlightingAssets a lot, since it will now always
be initialized with a SerializedSyntaxSet.
3 years ago
Bojan Durdevic c86a179412 PR comments addressed for line range +delta syntax 3 years ago
Bojan Durdevic 0748783404 Support for line range plus syntax 3 years ago
Martin Nordholts b3247d9364 Merge the v0.18.3 hotfix release into master
The v0.18.3 release was a hotfix release to make bat build again with Rust 1.54.
This merge commit brings in all changes from the hotfix release into the master
branch.

In practice, this only brings in one new commit, namely b146958ec. The other
three commits in the release were cherry-picks from master.
3 years ago
Martin Nordholts b146958ecb Bump version to v0.18.3 3 years ago
Mario Finelli 5125e9c941 Add support for ruby-slim syntax 3 years ago
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
Ville Skyttä 79f08588c6 Mention syslog highlight improvements in change log 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
Keith Hall 05c11964fc add patch for Python syntax to help improve performance 3 years ago
Martin Nordholts 1ef0206f24 CHANGELOG.md: Highlight for `vimrc` and `gvimrc` files 3 years ago
Layle | Luca 51c7eb7ac1
Included LLVM syntax highlighting submodule and added regression tests 3 years ago
Keith Hall 6d5ff671e7 Add HTTP Request/Response syntax as a git submodule 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 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 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 6e536ab06d Update CHANGELOG 3 years ago
David Peter 945bba777b Upgrade CHANGELOG with security vulnerability notice 3 years ago
David Peter a4b674902f Bump version to v0.18.2 3 years ago
David Peter 3c59b98dc8 Add CHANGELOG entry for #1687 3 years ago
Ville Skyttä 0e9d612173 Add change log entry for bash completion 3 years ago
Ville Skyttä 90e48e9b61 Spelling fixes 3 years ago
Martin Nordholts f4217eba73
Merge pull request #1669 from sharkdp/dependabot/submodules/assets/syntaxes/02_Extra/DotENV-58201ba
Bump assets/syntaxes/02_Extra/DotENV from `a1c9176` to `58201ba`
3 years ago
Mohamed Abdelnour 14900f6ed8 Update `CHANGELOG.md` for #1668 3 years ago
Martin Nordholts bcca56e3b1 CHANGELOG.md: Apply DotENV syntax also for .env.default and .env.defaults 3 years ago
Mohamed Abdelnour cf7d9ef962 Update `CHANGELOG.md` for #1661 3 years ago
Mohamed Abdelnour 8435cad602 Merge master 3 years ago
Mohamed Abdelnour 6fc9641f6a Update CHANGELOG for #1655 3 years ago
Mohamed Abdelnour ef5154d5b3 Update CHANGELOG for #1654 3 years ago
David Peter 73dab51ad1 Bump version, update dependencies 3 years ago
David Peter 9328007d05 Updated CHANGELOG 3 years ago
David Peter 5db3c93057
Merge branch 'master' into syslog 3 years ago
Keith Hall 3559079de0 Improvements to CSV highlighting 3 years ago
Ethan P aa09a9dc04
Update changelog for #1589 3 years ago
Keith Hall 1537733e6b replace Syslog dependency with a custom syntax 3 years ago
Sean McLoughlin d89fa3ebc2 Add SystemVerilog support 3 years ago
David Peter 52f84b063c Update dependencies, MSRV: 1.45 3 years ago
Aleksey Kladov 35347c2310 Improve readability
Using `Path`s for paths expresses intent more clearly.
3 years ago
David Peter b147443c32 Add new unreleased section 3 years ago
David Peter ca60937c2e Do not ignore non-existent BAT_CONFIG_PATH
Do not ignore `BAT_CONFIG_PATH` if it doesn't exist. Both when
generating a new config file with `--generate-config-file` and
when attempting to read the config.

Also, provide a better error message in case the file can not
be created.

closes #1550
3 years ago
David Peter 2aa3ed9da8 Update CHANGELOG 3 years ago
David Peter 7eabb5e05a Highlight *.pac files as JavaScript
closes #1515
3 years ago
Martin Nordholts 37d0d8984c README.md: Warn about buggy snap packages
As discussed in #1519, the batcat snap package is too problematic for
official endorsement, so withdraw recommendation from README.me (and
remove section from CHANGELOG.md since a release with it has not been
made yet).
3 years ago
Keith Hall 2e8c0a39db Add support for env vars and manpage refs with dots to Manpage syntax 3 years ago
Martin Nordholts c48e779e8a CHANGELOG.md: Add entry for #1413 4 years ago
sharkdp 060b9981b5 Remove deprecated PrettyPrinter methods 4 years ago
Martin Nordholts 02e6ff4183 Merge remote-tracking branch 'origin/master' into fix-1063 4 years ago