1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-03 11:52:26 +01:00

Integrate README.md with new assets.md (#1293)

This commit is contained in:
Terence
2020-10-14 19:18:11 +13:00
committed by GitHub
parent d075d2b453
commit f80fba4d24
2 changed files with 24 additions and 10 deletions

View File

@@ -391,12 +391,14 @@ variable to make these changes permanent or use `bat`s
### Adding new syntaxes / language definitions
`bat` uses the excellent [`syntect`](https://github.com/trishume/syntect/)
Should you find a particular syntax is not available within `bat`, you can follow these instructions to easily add new syntaxes to your current `bat` installation.
By default, `bat` uses the excellent [`syntect`](https://github.com/trishume/syntect/)
library for syntax highlighting. `syntect` can read any
[Sublime Text `.sublime-syntax` file](https://www.sublimetext.com/docs/3/syntax.html)
and theme. To add new syntax definitions, do the following.
and theme.
Create a folder with syntax definition files:
1. Create a folder with syntax definition files:
```bash
mkdir -p "$(bat --config-dir)/syntaxes"
@@ -407,13 +409,13 @@ cd "$(bat --config-dir)/syntaxes"
git clone https://github.com/tellnobody1/sublime-purescript-syntax
```
Now use the following command to parse these files into a binary cache:
2. Now use the following command to parse these files into a binary cache:
```bash
bat cache --build
```
Finally, use `bat --list-languages` to check if the new languages are available.
3. Finally, use `bat --list-languages` to check if the new languages are available.
If you ever want to go back to the default settings, call:
@@ -421,6 +423,10 @@ If you ever want to go back to the default settings, call:
bat cache --clear
```
4. If you think that a specific syntax should be included in `bat` by default, please
consider opening a "syntax request" ticket after reading the policies and
instructions [here](doc/assets.md)
### Adding new themes
This works very similar to how we add new syntax definitions.