emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
21.72k stars 1.57k forks source link

Add Syntect custom syntax & themes support #3964

Open antaalt opened 7 months ago

antaalt commented 7 months ago

Hello, I am trying to work with the syntect code editor which is great, the issue I have now is that it seems impossible to load custom syntax & themes to add support for others languages than the one available by default in sublime text, maybe I just missed the API, but it would be nice to be able to load a custom tmTheme and sublime-syntax as Syntect support this via SyntaxSetBuilder.

From what I saw, egui run syntect::parsing::SyntaxSet::load_defaults_newlines() which is created with the cache, but we could somehow allow egui to load custom themes & syntax aswell

TimTheBig commented 1 week ago

Any progress? I would be open to writing a patch that allows for loading of a syntax highlighting theme from a .tmTheme(sublime theme) file. I just wanted to know if there is any reason that this is not implemented?

antaalt commented 6 days ago

Didn't had the time to look into it. It does not look like a highly requested feature, which would explain why it's not implemented