mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-28 08:05:55 +00:00
Include syntaxes and themes in repository
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"
This commit is contained in:
1 parent
9af1d2b891
commit
145b99f01c
17 files changed
+78
-53
No files matched your search
+6
-32
@@ -1,37 +1,11 @@
|
||||
set -e
|
||||
#!/bin/bash
|
||||
|
||||
THEME_FOLDER="$HOME/.config/bat/themes"
|
||||
SYNTAX_FOLDER="$HOME/.config/bat/syntax"
|
||||
ASSET_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ ! -e "$THEME_FOLDER" ]; then
|
||||
mkdir -p "$THEME_FOLDER"
|
||||
(
|
||||
cd "$THEME_FOLDER"
|
||||
git clone https://github.com/jonschlinkert/sublime-monokai-extended
|
||||
ln -s "sublime-monokai-extended/Monokai Extended.tmTheme" Default.tmTheme
|
||||
)
|
||||
fi
|
||||
DEFAULT_MARKDOWN_SYNTAX="$ASSET_DIR/syntaxes/Packages/Markdown"
|
||||
|
||||
if [ ! -e "$SYNTAX_FOLDER" ]; then
|
||||
mkdir -p "$SYNTAX_FOLDER"
|
||||
(
|
||||
cd "$SYNTAX_FOLDER"
|
||||
git clone https://github.com/sublimehq/Packages/
|
||||
rm -rf "$DEFAULT_MARKDOWN_SYNTAX"
|
||||
|
||||
# Patch JavaScript syntax
|
||||
sed -i -e 's/{{identifier_break}}+/{{identifier_break}}/' Packages/JavaScript/JavaScript.sublime-syntax
|
||||
bat cache --init --source="$ASSET_DIR" --target="$ASSET_DIR"
|
||||
|
||||
# Use extended Markdown syntax
|
||||
rm -rf Packages/Markdown
|
||||
git clone https://github.com/jonschlinkert/sublime-markdown-extended
|
||||
|
||||
# Add additional sxntax definitions
|
||||
git clone https://github.com/princemaple/elixir-sublime-syntax/
|
||||
git clone https://github.com/sharkdp/sublime_toml_highlighting
|
||||
git clone https://github.com/JuliaEditorSupport/Julia-sublime
|
||||
)
|
||||
fi
|
||||
|
||||
bat cache --init
|
||||
|
||||
cp "$HOME/.cache/bat"/* .
|
||||
git -C "$ASSET_DIR/syntaxes/Packages" checkout "$DEFAULT_MARKDOWN_SYNTAX"
|
||||
Binary file not shown.
Binary file not shown.
Submodule
+1
Submodule assets/syntaxes/Elixir added at 044d9af8a1.
Submodule
+1
Submodule assets/syntaxes/Julia added at 581805e47c.
Submodule
+1
Submodule assets/syntaxes/Markdown-Extended added at 7b7a83aeea.
Submodule
+1
Submodule assets/syntaxes/Packages added at 1cb4c3ec36.
Submodule
+1
Submodule assets/syntaxes/TOML added at b5e3064e99.
Binary file not shown.
Binary file not shown.
Symlink
+1
@@ -0,0 +1 @@
|
||||
sublime-monokai-extended/Monokai Extended.tmTheme
|
||||
Submodule
+1
Submodule assets/themes/sublime-monokai-extended added at 1658f51c15.
Reference in new issue
Block a user