Commit Graph

425 Commits (6db64cf050f0425d059d5c8bf3dfd9fdd98d9976)

Author SHA1 Message Date
Martin Nordholts 405e5f7460 assets/create.sh 2 years ago
Martin Nordholts 5fe9b3e1b3 Make `INI` syntax register as handler of `.inf` files
We need to type `inf` and `INF` as strings in `INI.sublime-syntax`,
otherwise `yaml-rust` interprets them as real numbers ("infinity") and
they do not get registered as file extensions:

    /Users/martin/src/yaml-rust # https://github.com/chyh1990/yaml-rust
    % cargo run --example dump_yaml ~/src/bat/assets/syntaxes/02_Extra/INI.sublime-syntax
    ---
    String("name"):
        String("INI")
    String("file_extensions"):
            String("ini")
            String("INI")
            Real("inf")
            Real("INF")
    ...

Also add a regression test.
2 years ago
Martin Nordholts 7334ab4542
Bump to syntect 5.0.0 to e.g. start lazy-loading syntaxes (#2181)
* Bump to syntect 5.0.0 to e.g. start lazy-loading themes

Closes #915
Closes #951
Closes #1846
Closes #1854

* Typo fix formated -> formatted

* Update CHANGELOG.md
2 years ago
dependabot[bot] ef3e398b2b
Bump assets/syntaxes/02_Extra/Zig from `87ecbca` to `1a4a384` (#2136)
* Bump assets/syntaxes/02_Extra/Zig from `87ecbca` to `1a4a384`

Bumps [assets/syntaxes/02_Extra/Zig](https://github.com/ziglang/sublime-zig-language) from `87ecbca` to `1a4a384`.
- [Release notes](https://github.com/ziglang/sublime-zig-language/releases)
- [Commits](87ecbcae6f...1a4a38445f)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/Zig
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update tests/syntax-tests/highlighted/Zig/example.zig and CHANGELOG.md

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago
Isaac Horvath adea895026
Add a --style=default option (#2119)
* Add a --style=default option

* Added --style=default test and CHANGELOG entry

* Format CHANGELOG.md options with quotes

Co-authored-by: Martin Nordholts <enselic@gmail.com>

* Update help text for '--style'

* Make --style=default the default option

* Update style descriptions: "basic" -> "recommended"

* Add integration test for --style=default as default

* Update clap long help for --style
2 years ago
dependabot[bot] a6bd28a78b Bump assets/syntaxes/02_Extra/Nginx from `15a1db1` to `65f5a63`
Bumps [assets/syntaxes/02_Extra/Nginx](https://github.com/brandonwamboldt/sublime-nginx) from `15a1db1` to `65f5a63`.
- [Release notes](https://github.com/brandonwamboldt/sublime-nginx/releases)
- [Commits](15a1db1510...65f5a63c0d)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/Nginx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
dependabot[bot] 4291fd5c65 Bump assets/syntaxes/02_Extra/Fish from `cd95616` to `98316d4`
Bumps [assets/syntaxes/02_Extra/Fish](https://github.com/Phidica/sublime-fish) from `cd95616` to `98316d4`.
- [Release notes](https://github.com/Phidica/sublime-fish/releases)
- [Commits](cd95616df5...98316d4332)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/Fish
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
Víctor González Prieto b0898900ce
Syntax: add cmd-help (#2148)
* Add cmd-help syntax

To highlight command --help messages.

* README.md: mention help message highlighting

* README.md: edit help message highlighting
2 years ago
dependabot[bot] e735562098 Bump assets/syntaxes/02_Extra/Fish from `2c254cc` to `cd95616`
Bumps [assets/syntaxes/02_Extra/Fish](https://github.com/Phidica/sublime-fish) from `2c254cc` to `cd95616`.
- [Release notes](https://github.com/Phidica/sublime-fish/releases)
- [Commits](2c254cc851...cd95616df5)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/Fish
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
Keith Hall c0ec03e08a Syntax: [Log] highlight escape characters in double quoted strings 2 years ago
Martin Nordholts 0655ecf23d Prepare for v0.20.0 release
Since we have added new enum variants to the `StyleComponent` which was
not previously marked `#[non_exhaustive]`, we must bump left-most
non-zero version number (see
[specifying-dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-cratesio)).
Otherwise client code that do exhaustive matches on `StyleComponent`
will stop compiling.
3 years ago
Martin Nordholts 3c057aa590 Add header-filename and header-filesize where missing 3 years ago
Josh Pencheon ad6cae433a
fix Bash completion on macOS (#2074)
* fix Bash completion on macOS

The Homebrew-provided bash-completion is version 1.x,
which doesn't provide _init_completion. We add a standard
shim instead.

* Add entry to CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>

* review: avoid calling _split_longopt repeatedly

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
3 years ago
ltdk e4f6fb2afe Add JQ syntax highlighting 3 years ago
dependabot[bot] 9ad147278f
Bump assets/syntaxes/02_Extra/GLSL from `4cd4acf` to `59a5f8a` (#2050)
* Bump assets/syntaxes/02_Extra/GLSL from `4cd4acf` to `59a5f8a`

Bumps [assets/syntaxes/02_Extra/GLSL](https://github.com/euler0/sublime-glsl) from `4cd4acf` to `59a5f8a`.
- [Release notes](https://github.com/euler0/sublime-glsl/releases)
- [Commits](4cd4acfffc...59a5f8a312)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/GLSL
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update CHANGELOG.md

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
dependabot[bot] f3f8194932
Bump assets/syntaxes/02_Extra/GraphQL from `59304d6` to `9b6f6d0` (#2000)
* Bump assets/syntaxes/02_Extra/GraphQL from `59304d6` to `9b6f6d0`

Bumps [assets/syntaxes/02_Extra/GraphQL](https://github.com/dncrews/GraphQL-SublimeText3) from `59304d6` to `9b6f6d0`.
- [Release notes](https://github.com/dncrews/GraphQL-SublimeText3/releases)
- [Commits](59304d6c7b...9b6f6d0a86)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/GraphQL
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update CHANGELOG.md

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
dependabot[bot] 2ae4ffcdfa
Bump assets/syntaxes/02_Extra/VimL from `c91fe3a` to `ee85822` (#2002)
* Bump assets/syntaxes/02_Extra/VimL from `c91fe3a` to `ee85822`

Bumps [assets/syntaxes/02_Extra/VimL](https://github.com/SalGnt/Sublime-VimL) from `c91fe3a` to `ee85822`.
- [Release notes](https://github.com/SalGnt/Sublime-VimL/releases)
- [Commits](c91fe3ab02...ee85822cbe)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/VimL
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update CHANGELOG.md

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
dependabot[bot] f5a7f86a64
Bump assets/syntaxes/02_Extra/TOML from `6bfcc3c` to `ed38438` (#2049)
* Bump assets/syntaxes/02_Extra/TOML from `6bfcc3c` to `ed38438`

Bumps [assets/syntaxes/02_Extra/TOML](https://github.com/jasonwilliams/sublime_toml_highlighting) from `6bfcc3c` to `ed38438`.
- [Release notes](https://github.com/jasonwilliams/sublime_toml_highlighting/releases)
- [Commits](6bfcc3c236...ed38438900)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/TOML
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update CHANGELOG.md for PR #2049

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
klemens 9287cf6b0b small typos, should not interrupt anything 3 years ago
Martin Nordholts 59a8f58be7 Run `assets/create.sh` 3 years ago
Mahdi Dibaiee 3f7bff90ba Add note regarding options passed to less by default in manpage
Fixes #1913

Signed-off-by: Mahdi Dibaiee <mdibaiee@pm.me>
3 years ago
Firegem 31ca212f86 Highlight nimble files with nim syntax 3 years ago
dependabot[bot] d4744dbed5 Bump assets/syntaxes/02_Extra/MediaWiki from `843a483` to `81bf97c`
Bumps [assets/syntaxes/02_Extra/MediaWiki](https://github.com/tosher/Mediawiker) from `843a483` to `81bf97c`.
- [Release notes](https://github.com/tosher/Mediawiker/releases)
- [Commits](843a483e8b...81bf97cace)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/MediaWiki
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot] abbccc91ed Bump assets/syntaxes/02_Extra/ssh-config from `201816b` to `e1012e9`
Bumps [assets/syntaxes/02_Extra/ssh-config](https://github.com/robballou/sublimetext-sshconfig) from `201816b` to `e1012e9`.
- [Release notes](https://github.com/robballou/sublimetext-sshconfig/releases)
- [Commits](201816b609...e1012e9f13)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/ssh-config
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot] 3358b075fb
Bump assets/syntaxes/02_Extra/TypeScript from `a607ddf` to `ba45efd` (#1834)
* Bump assets/syntaxes/02_Extra/TypeScript from `a607ddf` to `ba45efd`

Bumps [assets/syntaxes/02_Extra/TypeScript](https://github.com/Microsoft/TypeScript-Sublime-Plugin) from `a607ddf` to `ba45efd`.
- [Release notes](https://github.com/Microsoft/TypeScript-Sublime-Plugin/releases)
- [Commits](a607ddfec9...ba45efd058)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/TypeScript
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Do machine-conversion from .tmLanguage to .sublime-syntax

The new .sublime-syntax files are pure "Tools" -> "Developer" -> "New Syntax
from ..." conversions from a licenced version of Sublime Text, Version 3.1.1,
Build 3176 with the .tmLanguage as the source files. No manual changes has been
made.

* Add CHANGELOG.md entry

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
dependabot[bot] a02713dc15
Bump assets/syntaxes/02_Extra/PowerShell from `4a0a076` to `742f0b5` (#1935)
* Bump assets/syntaxes/02_Extra/PowerShell from `4a0a076` to `742f0b5`

Bumps [assets/syntaxes/02_Extra/PowerShell](https://github.com/PowerShell/EditorSyntax) from `4a0a076` to `742f0b5`.
- [Release notes](https://github.com/PowerShell/EditorSyntax/releases)
- [Commits](4a0a076661...742f0b5d4b)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/PowerShell
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Do machine-conversion from .tmLanguage to .sublime-syntax

The new .sublime-syntax file is a pure "Tools" -> "Developer" -> "New Syntax
from ..." conversion from a licenced version of Sublime Text, Version 3.1.1,
Build 3176 with the .tmLanguage as the source file. No manual changes has been
made.

* Update regression test and add CHANGELOG.md entry

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
dependabot[bot] ee1f5a9e89
Bump assets/syntaxes/02_Extra/SCSS_Sass from `63819a1` to `d3d9404` (#1766)
* Bump assets/syntaxes/02_Extra/SCSS_Sass from `63819a1` to `d3d9404`

Bumps [assets/syntaxes/02_Extra/SCSS_Sass](https://github.com/braver/SublimeSass) from `63819a1` to `d3d9404`.
- [Release notes](https://github.com/braver/SublimeSass/releases)
- [Commits](63819a1ab6...d3d9404640)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/SCSS_Sass
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update regression test and add CHANGELOG.md entry

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
Martin Nordholts 84a15f0b6e assets/create.sh: Reverse patches even if `bat cache` fails or aborts 3 years ago
Martin Nordholts a3ea798246
Credit syntax definition and theme authors with new `--acknowledgements` option (#1971)
The text that is printed is generated when building assets, by analyzing LICENSE
and NOTICE files that comes with syntaxes and themes.

We take this opportunity to also add a NOTICE file as defined by Apache License 2.0.
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] 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
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 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
Shun Sakai 619cf6e6d6 Add MediaWiki syntax 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
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
NotWearingPants 6fc7ebf37a
Add missing style values in fish & zsh completions (#1890) 3 years ago
Georgy Komarov d04a83de7b Add Racket syntax 3 years ago
dependabot[bot] 7a15ba3796 Bump assets/syntaxes/02_Extra/Julia from `48639e1` to `1e55f32`
Bumps [assets/syntaxes/02_Extra/Julia](https://github.com/JuliaEditorSupport/Julia-sublime) from `48639e1` to `1e55f32`.
- [Release notes](https://github.com/JuliaEditorSupport/Julia-sublime/releases)
- [Commits](48639e1dbf...1e55f3211b)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/Julia
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Martin Nordholts 9124271eaf
Load independent and minimal syntax sets when using --language (#1787)
This significantly speeds up the startup time of bat, since only a single
linked SyntaxDefinition is loaded for each file. The size increase of the
binary is just ~400 kB.

In order for startup time to be improved, the --language arg must be used, and
it must match one of the following names:

"Plain Text", "ActionScript", "AppleScript", "Batch File", "NAnt Build File",
"C#", "C", "CSS", "D", "Diff", "Erlang", "Go", "Haskell", "JSON", "Java
Properties", "BibTeX", "LaTeX Log", "TeX", "Lisp", "Lua", "MATLAB", "Pascal",
"R", "Regular Expression", "Rust", "SQL", "Scala", "Tcl", "XML", "YAML", "Apache
Conf", "ARM Assembly", "Assembly (x86_64)", "CMakeCache", "Comma Separated
Values", "Cabal", "CoffeeScript", "CpuInfo", "Dart Analysis Output", "Dart",
"Dockerfile", "DotENV", "F#", "Friendly Interactive Shell (fish)", "Fortran
(Fixed Form)", "Fortran (Modern)", "Fortran Namelist", "fstab", "GLSL",
"GraphQL", "Groff/troff", "group", "hosts", "INI", "Jinja2", "jsonnet",
"Kotlin", "Less", "LLVM", "Lean", "MemInfo", "Nim", "Ninja", "Nix", "passwd",
"PowerShell", "Protocol Buffer (TEXT)", "Puppet", "Rego", "resolv", "Robot
Framework", "SML", "Strace", "Stylus", "Solidity", "Vyper", "Swift",
"SystemVerilog", "TOML", "Terraform", "TypeScript", "TypeScriptReact",
"Verilog", "VimL", "Zig", "gnuplot", "log", "requirements.txt", "Highlight
non-printables", "Private Key", "varlink"

Later commits will improve startup time for more code paths.

* fix some typos and misspellings

* CHANGELOG.md: Add Performance section (preliminary)

* Add a CHANGELOG.md entry for this PR
3 years ago
Rashil Gandhi 43afae34be
Add PowerShell completion file (#1826) 3 years ago
Bojan Durdevic 0748783404 Support for line range plus syntax 3 years ago
a1346054 51edacb5eb style: trim excess whitespace 3 years ago
a1346054 5d319dee94 style(create.sh): remove non-POSIX keyword 3 years ago
Keith Hall 133b06e945 Fix syslog syntax highlighting when no colon after "process" 3 years ago
Mario Finelli 9ef87dab27 Convert tmLanguage into sublime-syntax 3 years ago
Mario Finelli 5125e9c941 Add support for ruby-slim syntax 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