Closed mikavilpas closed 1 month ago
So just to be clear, you can already partially override a theme in the front matter by using the override
key so you could do this on a per presentation basis but I understand this is annoying.
Something that I thought about implementing in the past and would fit here is being able to have themes that extend others. You could create a theme that has an
extends: catppuccin-macchiato
And this means it basically inherits everything from that theme. Then you can add the property to set the code highlighter and there's that. So this would be what you're doing except you wouldn't need to maintain it as it will always inherit everything from the base theme. Would this work for you? This seems in line with the "allow partially overriding a builtin theme" suggestion you have except it applies to any theme, not just built in.
Add a new configuration option for specifying the code highlighting theme
I don't particularly like this solution because the code highlighter theme is just one of the many properties a theme has so adding a config parameter just for this one seems strange.
Yeah, that sounds really good to me. 👍🏻
I created #265 for this but I realized I need a topological sort to deal with theme recursion (A extends B extends C) and I ran out of time today, I'll try to finish it tomorrow. For now it works, except not if you have an extension chain ^.
Thanks, this works perfectly 👍🏻
I like to use the Catppuccin Macchiato theme in my presentations as it matches my other tools (they also use the same theme). Presenterm also comes bundled with the Catppuccin Macchiato theme, so I can use it without any additional setup.
However, code highlighting in the builtin theme is set to
base16-eighties.dark
which looks a bit strange. I would like my presentations to use the Catppuccin Macchiato theme (from https://github.com/catppuccin/bat) for code highlighting as well.I verified that currently I can do this by
copying the theme file to
/Users/mikavilpas/.config/presenterm/themes/highlighting/xx.tmTheme
creating a copy of the existing theme to
/Users/mikavilpas/.config/presenterm/themes/catppuccin-macchiato-mika.yaml
specifying this in my config:
manually changing the code highlighting settings in the default theme. However, this is not ideal as I have to maintain the theme myself.
I understand that it might be difficult to bundle the Catppuccin Macchiato code highlighting theme with Presenterm, but do you think it could be possible to allow customizing the code highlighting theme for users that are willing to install it manually?
I would be happy to contribute to this feature if you think it is a good idea.
Possible approaches
Maybe there is a better idea that I can't think of. Would love to hear your thoughts.