Commit graph

1750 commits

Author SHA1 Message Date
Paul Smith
c76e27851c Add support for Zig
Adds syntax support for source code for the Zig programming
language. https://ziglang.org/
2021-01-02 21:34:25 +01:00
sharkdp
8c0dcf3b57 Update syntax test instructions 2021-01-02 21:21:28 +01:00
sharkdp
962b3a78c0 Add step-by-step guide to add syntax tests, see #1211 2021-01-02 10:21:02 +01:00
sharkdp
aa5b941ed5 Add ChangeLog entry 2021-01-02 09:46:58 +01:00
Julian Berman
af8a8035e8 Add a Lean highlighting test file. 2021-01-02 09:45:19 +01:00
Julian Berman
037a66c57b Add the Lean submodule. 2021-01-02 09:45:19 +01:00
Julian Berman
1a04dcf10f Add Lean.sublime-syntax.
Covers syntax for Lean 3, an interactive theorem prover
at https://leanprover-community.github.io/ whose users
mostly use VSCode.
2021-01-02 09:45:19 +01:00
David Peter
2eae8b578e
Fix repology badge 2021-01-01 23:07:13 +01:00
dependabot-preview[bot]
17189fce9b Bump assets/themes/zenburn from cb746f6 to 7f6fb86
Bumps [assets/themes/zenburn](https://github.com/colinta/zenburn) from `cb746f6` to `7f6fb86`.
- [Release notes](https://github.com/colinta/zenburn/releases)
- [Commits](cb746f6962...7f6fb86e0d)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:14:47 +01:00
dependabot-preview[bot]
a0225018e6 Bump assets/syntaxes/02_Extra/TypeScript from 603ebb4 to a607ddf
Bumps [assets/syntaxes/02_Extra/TypeScript](https://github.com/Microsoft/TypeScript-Sublime-Plugin) from `603ebb4` to `a607ddf`.
- [Release notes](https://github.com/Microsoft/TypeScript-Sublime-Plugin/releases)
- [Commits](603ebb48b1...a607ddfec9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:14:16 +01:00
dependabot-preview[bot]
361b7aa0da Bump console from 0.13.0 to 0.14.0
Bumps [console](https://github.com/mitsuhiko/console) from 0.13.0 to 0.14.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.13.0...0.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:14:00 +01:00
dependabot-preview[bot]
334590932a Bump syntect from 4.4.0 to 4.5.0
Bumps [syntect](https://github.com/trishume/syntect) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/trishume/syntect/releases)
- [Changelog](https://github.com/trishume/syntect/blob/master/CHANGELOG.md)
- [Commits](https://github.com/trishume/syntect/compare/v4.4.0...v4.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:10:49 +01:00
dependabot-preview[bot]
3f4638204f Bump git2 from 0.13.12 to 0.13.15
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.12 to 0.13.15.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.12...0.13.15)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:10:32 +01:00
dependabot-preview[bot]
5e7061b9f6 Bump predicates from 1.0.5 to 1.0.6
Bumps [predicates](https://github.com/assert-rs/predicates-rs) from 1.0.5 to 1.0.6.
- [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.5...v1.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:10:03 +01:00
dependabot-preview[bot]
7a1cd5226f Bump serde from 1.0.117 to 1.0.118
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.117 to 1.0.118.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.117...v1.0.118)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:09:55 +01:00
dependabot-preview[bot]
285ac75738 Bump assets/syntaxes/02_Extra/Julia from 6c0d770 to e2b1cb5
Bumps [assets/syntaxes/02_Extra/Julia](https://github.com/JuliaEditorSupport/Julia-sublime) from `6c0d770` to `e2b1cb5`.
- [Release notes](https://github.com/JuliaEditorSupport/Julia-sublime/releases)
- [Commits](6c0d770fc7...e2b1cb549d)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:09:25 +01:00
dependabot-preview[bot]
00ff54be4e Bump assets/syntaxes/02_Extra/SCSS_Sass from bc6332c to 4868322
Bumps [assets/syntaxes/02_Extra/SCSS_Sass](https://github.com/braver/SublimeSass) from `bc6332c` to `4868322`.
- [Release notes](https://github.com/braver/SublimeSass/releases)
- [Commits](bc6332c1be...4868322030)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:08:29 +01:00
dependabot-preview[bot]
aab35e3faa Bump assets/themes/dracula-sublime from 26c57ec to c2de0ac
Bumps [assets/themes/dracula-sublime](https://github.com/dracula/sublime) from `26c57ec` to `c2de0ac`.
- [Release notes](https://github.com/dracula/sublime/releases)
- [Commits](26c57ec282...c2de0acf5a)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 08:08:00 +01:00
Martin Nordholts
c0d945c0ac Allow clippy::style lints
Turns out GitHub is clever enough to pick up clippy warnings from us
just running it, and showing them in PRs under a "Unchanged files with
check annotations (beta)" header.

The only warnings currently shown are style warnings, and we agreed we
don't want to risk putting off contributors over style issues. So
explicitly allow (don't warn in the logs for) this category of clippy
lints.

This means that the only clippy categories left that prints warnings
(Warn) are:

    clippy::complexity
    clippy::perf

And the only category of lints that fails the CI build (Deny) remains to
be:

    clippy::correctness

See https://rust-lang.github.io/rust-clippy/master/index.html for a
catalog of all lints.
2020-12-30 11:46:56 +01:00
sharkdp
6d0e7650c3 Add .resource extension for Robot Framework 2020-12-29 09:04:34 +01:00
Martin Nordholts
f45fa5e187 CHANGELOG.md: Add bugfix entry for #614 2020-12-28 22:32:56 +01:00
Martin Nordholts
05e9da390f bat cache --build: Print syntect error message for themes if any
This will fix #614 by making it clear what is wrong by showing the
following error message:

    Failed to load one or more themes from
    '/Users/me/.config/bat/themes' (reason: 'Invalid syntax theme
    settings')

We also need to add a check if theme_dir.exists(), otherwise an absent
dir will seem like an error:

    Failed to load one or more themes from
    '/Users/me/.config/bat/themes' (reason: 'IO error for
    operation on /Users/me/.config/bat/themes: No such file or
    directory (os error 2)')

(This is the same check we already have for syntax_dir.)
2020-12-28 22:32:56 +01:00
Martin Nordholts
9c16571347 bat --list-languages: remove unnecessary format!() call
To trigger/verify the changed code, run

    bat --list-languages   # or -L

This is the last clippy warning in the code that you get if you run

    cargo clippy --all-targets --all-features -- --allow clippy::style

so by fixing it it becomes easier to spot when a new warning is
introduced (that does not belong to the clippy category clippy::style).
And by making it easy to spot new warnings, we increase chance of such
regressions not ending up in the code base.
2020-12-28 20:28:24 +01:00
Martin Nordholts
2765c6ba3b clippy: Only enforce 'correctness' lints, just print the rest
Only the 'correctness' category of lints are 'deny' by default. This is
the only clippy lints we want to enforce for now. The other ones we just
want to print in the logs. So remove any --deny and --allow arguments.
See discussion in #1410.
2020-12-28 14:22:56 +01:00
Martin Nordholts
28f3f3c9c9 Add Clippy linter step to CICD
Run the linter on the minimum supported rust version; otherwise we will
get lint warnings for things that require a too high Rust toolchain
version to fix.

Allow the following checks, since we already violate them our code:
- clippy::new-without-default
- clippy::match-bool
- clippy::if_same_then_else

Eventually we should fix these lint issues and then disallow them to
prevent them from coming back in other places.

The clippy args used is recommended here:
https://github.com/rust-lang/rust-clippy#travis-ci
2020-12-28 14:22:56 +01:00
sharkdp
73d9a95862 Update CHANGELOG 2020-12-28 09:36:49 +01:00
Ensar Sarajčić
9c9a9ac452 Update VimL syntax upstream 2020-12-28 09:33:32 +01:00
Ensar Sarajčić
29ea396c31 Improve VimL regex highlighting
**NOTES:**
- PR is not yet merged in upstream repository (https://github.com/SalGnt/Sublime-VimL/pull/12),
but sublime-syntax file is already updated with changes.
- Updated syntax test files are added as well

This fixes #1064
2020-12-28 09:33:32 +01:00
Ensar Sarajčić
171d215f91 Add case from #1604 to VimL syntax-test source 2020-12-28 09:33:32 +01:00
Ensar Sarajčić
cc6109a751 Add syntax highlighting tests for VimL
Adds a syntax highlighting test for VimL
with source file based on parts of my own configuration
changed to cover as much of syntax as possible.

**NOTES:**
Last line of source (`syntax enable`) does not get highlighted,
since `syntax` keyword is not part of highlighting rules.

Related to #1213
2020-12-28 09:33:32 +01:00
Martin Nordholts
47bb4a9c0f Introduce bat_warning! helper macro
This macro is intended to be package-internal and is not to be
considered part of the public lib API.

Use it in three places to reduce code duplication. However, main reason
for this refactoring is to allow us to fix #1063 without duplicating the
code yet another time.

The macro can also be used for the "Binary content from {} will not be
printed to the terminal" message if that message starts to use eprintln!
instead (if ever).

To trigger/verify the changed code, the following commands can be used:

    cargo run -- --theme=ansi-light tests/examples/single-line.txt
    cargo run -- --theme=does-not-exist tests/examples/single-line.txt
    cargo run -- --style=grid,rule tests/examples/single-line.txt
2020-12-28 09:27:40 +01:00
Marco Ieni
b149ea91dd Cargo.toml: remove "readme" field 2020-12-28 09:26:44 +01:00
Martin Nordholts
6d1c7d5f57 Fix clippy::if_same_then_else warning in --paging=auto logic 2020-12-28 09:21:27 +01:00
David Peter
07bd7503c5 Update CHANGELOG.md 2020-12-21 21:52:04 +01:00
John Meow
1b5af89ddd Move changelog entry to unreleased 2020-12-21 21:52:04 +01:00
John Meow
3d07dec8fd Use Briles/gruvbox .tmTheme files instead of peaceant's port 2020-12-21 21:52:04 +01:00
Martin Nordholts
a63bb08eda Add test 'grid_for_file_without_newline' (for issue #299 fix)
This is a regression test for the fix for issue #299. If that fix is
reverted, currently only one test ('header_padding') fails. But that
test is for a different use case, so add a dedicated regression test for
the particular use case issue #299 is about.
2020-12-21 21:45:34 +01:00
sharkdp
e0207f8167 Fix test 2020-12-21 17:05:10 +01:00
Mitchell Kember
3099f51ba7 Add ansi theme to replace ansi-light and ansi-dark
This combines ansi-light and ansi-dark into a single theme that works
with both light and dark backgrounds. Instead of specifying white/black,
the ansi theme uses the terminal's default foreground/background color
by setting alpha=01, i.e. #00000001. This is in addition to the alpha=00
encoding where red contains an ANSI color palette number.

Now, `--theme ansi-light` and `--theme ansi-dark` will print a
deprecation notice and use ansi instead (unless the user has a custom
theme named ansi-light or ansi-dark, which would take precedence).
2020-12-21 17:05:10 +01:00
sharkdp
19e7763f35 Add changelog entry 2020-12-21 09:42:06 +01:00
David Peter
73cff42ec9 Remove commented-out line from Cargo.toml 2020-12-21 09:41:29 +01:00
Lovecraftian Horror
b349155f2f Remove repeated contains calls 2020-12-21 09:41:29 +01:00
sharkdp
ab4c120ea5 Highlight 'batcat' note in README, see #1420 2020-12-21 09:36:14 +01:00
David Peter
947133d295 Update CHANGELOG.md 2020-12-21 09:24:56 +01:00
Stefan Kunkel
bf96e6e642 make bat -L use plain style 2020-12-21 09:24:56 +01:00
Stefan Kunkel
cffacad306 make bat -L use pager 2020-12-21 09:24:56 +01:00
David Peter
cc7b89faf8
Merge pull request #1440 from Enselic/fix-1438-newline-can-be-added-even-if-style-plain
Don't add artificial newline to last line if --style=plain
2020-12-21 09:24:26 +01:00
chris48s
c1e4746d50 change docs dir name to match package name
i.e: docs for bat-musl go in /usr/share/doc/bat-musl
not /usr/share/doc/bat
2020-12-21 09:23:56 +01:00
chris48s
8331eec7fc include changelog in package
in line with debian changelog/release notes guidance
https://www.debian.org/doc/debian-policy/ch-docs.html#changelog-files-and-release-notes
resolves changelog-file-missing-in-native-package
https://lintian.debian.org/tags/changelog-file-missing-in-native-package.html
2020-12-21 09:23:56 +01:00
chris48s
0547068ed0 include years in copyright notice
This brings the copyright notice into line with the expected format
resolves copyright-without-copyright-notice
https://lintian.debian.org/tags/copyright-without-copyright-notice.html
2020-12-21 09:23:56 +01:00