- New themes in `$BAT_CONFIG_DIR/themes` are now loaded *in addition* to
the default themes (they may also override).
- The `Default.tmTheme` symlink is not necessary anymore.
This relates to #172
This commit separates the handling of syntax sets and theme sets. It
also changes the way how new syntax definitions are loaded from `bat`'s
configuration folder. New syntax definitions are now loaded *in
addition* to the ones that are stored in the `bat` binary by default.
This fixes#172
The `--theme` command line option stills takes precedence and this
change preserves how errors are handled when it's used: If a theme name
that doesn't exist is specified using the argument, this error is fatal.
However, if a theme that doesn't exist is specified using the environment
variable, the error is logged to `stderr` and the "Default" theme is
loaded as a fallback.
Before this patch:
$ bat cache --init
[bat error]: Could not load themes from '{}'
After:
$ bat cache --init
[bat error]: Could not load themes from '/home/user/.config/bat/themes'
This changes a few things:
- All syntaxes and themes are now stored (as submodules) under
assets/syntaxes and assets/themes
- The default directories for syntaxes and themes are "syntaxes"
and "themes" (used to be "syntax" and "themes")
- The "bat cache" command can now take a `--source <dir>` and
`--target <dir>` option.
- The cached files have been renamed to "themes.bin" and "syntaxes.bin"