Crate egui_code_editor

source ·
Expand description

Text Editor Widget for egui with numbered lines and simple syntax highlighting based on keywords sets.

Usage

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);

Re-exports

Modules

Structs

  • CodeEditor struct which stores settings for highlighting.
  • Colors in hexadecimal notation as used in HTML and CSS.
  • Rules for highlighting.

Constants