You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had a lot of ideas floating around, so figured it would be good to open an issue that covers all of them
Existing issues / papercuts:
SyntectAdapter panics when trying to use a theme name that isn't contained in the theme_set
SyntectAdapter holds an entire theme set when holding the single theme being used would suffice
No way to use SyntectAdapter without pulling in the embedded defaults from syntect
I'm currently using an external syntax definitions in one of my projects, but I still wind up with ~0.8 MiB of extra data in the final binary from syntects default syntax definitions
No obvious way to know which themes are included in the default set
1) and 2) are addressed by moving getting the actual Theme to use to caller code, 3) is addressed by adding an extra syntect-no-defaults feature that would remove SyntectAdapter::defaults(), SyntectBuilder::default_theme(), and SyntectBuilder::default_syntax_set(), and 4) is addressed through adding DefaultTheme and SyntectBuilder::default_theme()
The text was updated successfully, but these errors were encountered:
I think point 3) is nil since the linker seems smart enough to throw away the unused embedded asset, so I don't think that adding more features to control that makes sense. I don't think that changes my ideal API though
I ran into a similar paper cut with themes. I'm using a theme that's almost the same as the default InspiredGitHub, but has a different background color. Having to override the ThemeSet for this use case makes it more troublesome than it needs to be.
Had a lot of ideas floating around, so figured it would be good to open an issue that covers all of them
Existing issues / papercuts:
SyntectAdapter
panics when trying to use atheme
name that isn't contained in thetheme_set
SyntectAdapter
holds an entire theme set when holding the single theme being used would sufficeSyntectAdapter
without pulling in the embedded defaults fromsyntect
Spitballing a new API
I was thinking providing something along the lines of
1) and 2) are addressed by moving getting the actual
Theme
to use to caller code, 3) is addressed by adding an extrasyntect-no-defaults
feature that would removeSyntectAdapter::defaults()
,SyntectBuilder::default_theme()
, andSyntectBuilder::default_syntax_set()
, and 4) is addressed through addingDefaultTheme
andSyntectBuilder::default_theme()
The text was updated successfully, but these errors were encountered: