mirror of https://github.com/sharkdp/bat
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"pull/123/head
parent
9af1d2b891
commit
145b99f01c
@ -0,0 +1,18 @@
|
||||
[submodule "assets/syntaxes/Elixir"]
|
||||
path = assets/syntaxes/Elixir
|
||||
url = https://github.com/princemaple/elixir-sublime-syntax/
|
||||
[submodule "assets/syntaxes/Packages"]
|
||||
path = assets/syntaxes/Packages
|
||||
url = https://github.com/sublimehq/Packages/
|
||||
[submodule "assets/syntaxes/TOML"]
|
||||
path = assets/syntaxes/TOML
|
||||
url = https://github.com/sharkdp/sublime_toml_highlighting
|
||||
[submodule "assets/syntaxes/Julia"]
|
||||
path = assets/syntaxes/Julia
|
||||
url = https://github.com/JuliaEditorSupport/Julia-sublime
|
||||
[submodule "assets/themes/sublime-monokai-extended"]
|
||||
path = assets/themes/sublime-monokai-extended
|
||||
url = https://github.com/jonschlinkert/sublime-monokai-extended
|
||||
[submodule "assets/syntaxes/Markdown-Extended"]
|
||||
path = assets/syntaxes/Markdown-Extended
|
||||
url = https://github.com/jonschlinkert/sublime-markdown-extended
|
@ -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.
@ -0,0 +1 @@
|
||||
Subproject commit 044d9af8a1cc5c4da234e60f4a22ce8603b2d772
|
@ -0,0 +1 @@
|
||||
Subproject commit 581805e47c7af5ab0a880aaef5b27f8c1ccc29aa
|
@ -0,0 +1 @@
|
||||
Subproject commit 7b7a83aeeaf3afc752f7d921b10051330557aa0e
|
@ -0,0 +1 @@
|
||||
Subproject commit 1cb4c3ec368c751d6f7ecfa16fe02ceff23a1f6b
|
@ -0,0 +1 @@
|
||||
Subproject commit b5e3064e9950dd36a2debed2ea95ab90712ab06a
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
sublime-monokai-extended/Monokai Extended.tmTheme
|
@ -0,0 +1 @@
|
||||
Subproject commit 1658f51c15400978b3f6ba7cf5ed6b171e71058c
|
Loading…
Reference in New Issue