Text Editor Widget for egui with numbered lines and simple syntax highlighting based on keywords sets.
use egui_code_editor::{CodeEditor, ColorTheme, Syntax};
CodeEditor::default()
.id_source("code editor")
.with_rows(12)
.with_fontsize(14.0)
.with_theme(ColorTheme::GRUVBOX)
.with_syntax(Syntax::rust())
.with_numlines(true)
.show(ui, &mut self.code);
});
}
Based on themes in Helix Editor.
Font used in examples is Comic Code by Toshi Omagari.