A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'sample.rs')
-rw-r--r--sample.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/sample.rs b/sample.rs
new file mode 100644
index 0000000..fe9bfd5
--- /dev/null
+++ b/sample.rs
@@ -0,0 +1,19 @@
+use atools::Chunked;
+use dsb::Cell;
+use dsb::cell::Style;
+use ropey::Rope;
+use tree_sitter::{InputEdit, Language, Parser, Point, Tree};
+use tree_sitter_highlight::{
+ HighlightConfiguration, HighlightEvent, Highlighter,
+};
+#[rustfmt::skip]
+const NAMES: [&str; 13] = ["attribute", "comment", "constant", "function", "keyword", "number", "operator", "punctuation",
+ "string", "tag", "type", "variable", "variable.parameter"];
+#[rustfmt::skip]
+const COLORS: [[u8; 3]; 13] = car::map!(
+ [
+ b"ffd173", b"5c6773", b"DFBFFF", b"FFD173", b"FFAD66", b"dfbfff", b"F29E74", b"cccac2",
+ b"D5FF80", b"DFBFFF", b"73D0FF", b"5ccfe6", b"5ccfe6"
+ ],
+ |x| color(x)
+);