W-Mai / fork_egui_code_editor

egui Code Editor widget with numbered lines and syntax highlighting..

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Egui Code Editor

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

Themes

Based on themes in Helix Editor.

Font used in examples is Comic Code by Toshi Omagari.

Ayu

Ayu

Ayu Dark

Ayu Dark

Ayu Mirage

Ayu Mirage

Github Dark

Github Dark

Github Light

Github Light

Gruvbox

Gruvbox

Gruvbox Light

Gruvbox Light

Sonokai

Sonokai

About

egui Code Editor widget with numbered lines and syntax highlighting..


Languages

Language:Rust 100.0%