mirror of
https://github.com/mfontanini/presenterm.git
synced 2026-09-01 23:33:21 -06:00
docs: move notes around external code highlighting via bat
This commit is contained in:
parent
2935eb617f
commit
8093875aea
@ -150,21 +150,3 @@ using the `+render` attribute on a code block.
|
||||
|
||||
See the [LaTeX and typst](latex.md) and [mermaid](mermaid.md) docs for more information.
|
||||
|
||||
## Adding highlighting syntaxes for new languages
|
||||
|
||||
_presenterm_ uses the syntaxes supported by [bat](https://github.com/sharkdp/bat) to highlight code snippets, so any
|
||||
languages supported by _bat_ natively can be added to _presenterm_ easily. Please create a ticket or use
|
||||
[this](https://github.com/mfontanini/presenterm/pull/385) as a reference to submit a pull request to make a syntax
|
||||
officially supported by _presenterm_ as well.
|
||||
|
||||
If a language isn't natively supported by _bat_ but you'd like to use it, you can follow
|
||||
[this guide in the bat docs](https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions) and
|
||||
invoke _bat_ directly in a presentation:
|
||||
|
||||
~~~markdown
|
||||
```bash +exec_replace
|
||||
bat --color always script.py
|
||||
```
|
||||
~~~
|
||||
|
||||
|
||||
|
||||
@ -130,3 +130,23 @@ language: rust
|
||||
Using the `+no_background` flag will cause the snippet to have no background. This is useful when combining it with the
|
||||
`+exec_replace` flag described further down.
|
||||
|
||||
## Adding highlighting syntaxes for new languages
|
||||
|
||||
_presenterm_ uses the syntaxes supported by [bat](https://github.com/sharkdp/bat) to highlight code snippets, so any
|
||||
languages supported by _bat_ natively can be added to _presenterm_ easily. Please create a ticket or use
|
||||
[this](https://github.com/mfontanini/presenterm/pull/385) as a reference to submit a pull request to make a syntax
|
||||
officially supported by _presenterm_ as well.
|
||||
|
||||
If a language isn't natively supported by _bat_ but you'd like to use it, you can follow
|
||||
[this guide in the bat docs](https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions) and
|
||||
invoke _bat_ directly in a presentation:
|
||||
|
||||
~~~markdown
|
||||
```bash +exec_replace
|
||||
bat --color always script.py
|
||||
```
|
||||
~~~
|
||||
|
||||
> [!note]
|
||||
> Check the [code execution docs](execution.md#executing-and-replacing) for more details on how to allow the tool to run
|
||||
> `exec_replace` blocks.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user