duskmoon_code_engine 1.2.0 copy "duskmoon_code_engine: ^1.2.0" to clipboard
duskmoon_code_engine: ^1.2.0 copied to clipboard

Pure Dart code editor engine with incremental parsing — a ground-up port of the CodeMirror 6 architecture for Flutter.

duskmoon_code_engine #

pub package

A pure Dart code editor engine for Flutter — a ground-up port of the CodeMirror 6 architecture. Zero external dependencies beyond Flutter.

Features #

  • Rope-based document model — efficient incremental text updates
  • Immutable state systemEditorState, Transaction, Selection, Facet, Extension
  • Incremental Lezer parserLRParser, SyntaxNode, TreeCursor
  • Tag-based syntax highlightingTag, HighlightStyle, TagStyle
  • 19 language grammars — Dart, JavaScript, TypeScript, Python, HTML, CSS, JSON, Markdown, Rust, Go, YAML, C, C++, Elixir, Java, Kotlin, PHP, Ruby, Erlang, Swift, Zig
  • Built-in commands — undo/redo, bracket matching, comment toggling, code folding, search & replace, clipboard
  • Flutter widgetCodeEditorWidget with virtual scrolling, gutter, selection painting, cursor blinking, search panel

Getting Started #

import 'package:duskmoon_code_engine/duskmoon_code_engine.dart';

CodeEditorWidget(
  initialCode: 'void main() => print("Hello!");',
  language: 'dart',
  theme: HighlightStyle.defaultStyle(),
);

Supported Languages #

Dart, JavaScript, TypeScript, Python, HTML, CSS, JSON, Markdown, Rust, Go, YAML, C, C++, Elixir, Java, Kotlin, PHP, Ruby, Erlang, Swift, Zig.

License #

MIT

0
likes
0
points
1.01k
downloads

Publisher

verified publishergsmlg.dev

Weekly Downloads

Pure Dart code editor engine with incremental parsing — a ground-up port of the CodeMirror 6 architecture for Flutter.

Repository (GitHub)
View/report issues

Topics

#code-editor #syntax-highlighting #flutter #codemirror

License

unknown (license)

Dependencies

flutter

More

Packages that depend on duskmoon_code_engine