add syntax highlighter to untracked files contents
[?]
Apr 24, 2025, 8:07 PM
B4RMW5AEGAJX5CFC4RFPI6Y3NBSDM7GZKNBPPTTICRZSDZSYNXHQCDependencies
- [2]
6YZAVBWUInitial commit - [3]
IQDCHWCPload a pijul repo - [4]
SWWE2R6Mdisplay basic repo stuff - [5]
UB2ITZJSrefresh changed files on FS changes - [6]
KT5UYXGKfix selection after adding file, add changed file diffs - [7]
YBJRDOTCmake all repo actions async - [8]
2VUX5BTDload identity - [9]
A5YBC77Vrecord! - [10]
4WO3ZJM2show untracked files' contents - [11]
PTFDJ567add untracked files encoding - [12]
AMPZ2BXKshow changed files diffs (only Edit atm) - [13]
AXSXZQDGfix updating changed file contents, styling - [14]
V55EAIWQadd src file LRU cache - [15]
ZONPDYO7wrap untracked files' contents on word or glyph - [16]
S2NVIFXRallow to enter record msg - [17]
Z2CJPWZEfocus record message text_editor on spawn - [18]
W4LFX7IHgroup diffs by file name - [19]
WT3GA27Padd cursor with selection - [20]
BJXUYQ2Yshow untracked file contents in read-only text editor
Change contents
- replacement in crates/inflorescence/src/main.rs at line 3
use clru::{CLruCache, WeightScale};use core::str;use std::collections::BTreeMap;use std::num::NonZero;use std::path::PathBuf;use std::sync::Arc;use std::{cmp, ffi}; - edit in crates/inflorescence/src/main.rs at line 14
use tokio_stream::StreamExt; - replacement in crates/inflorescence/src/main.rs at line 15
use core::str;use clru::{CLruCache, WeightScale}; - replacement in crates/inflorescence/src/main.rs at line 18
font, Border, Color, Element, Font, Length, Subscription, Task, Theme,font, highlighter, Border, Color, Element, Font, Length, Subscription,Task, Theme, - edit in crates/inflorescence/src/main.rs at line 25[5.351]→[6.4600:4614](∅→∅),[6.4614]→[12.1395:1427](∅→∅),[12.1427]→[14.59:82](∅→∅),[14.82]→[5.351:375](∅→∅),[12.1427]→[5.351:375](∅→∅),[6.4614]→[5.351:375](∅→∅),[7.4708]→[5.351:375](∅→∅),[5.351]→[5.351:375](∅→∅),[5.375]→[9.4511:4531](∅→∅)
use std::cmp;use std::collections::BTreeMap;use std::num::NonZero;use std::path::PathBuf;use std::sync::Arc; - edit in crates/inflorescence/src/main.rs at line 29
use tokio_stream::StreamExt; - edit in crates/inflorescence/src/main.rs at line 1111
- replacement in crates/inflorescence/src/main.rs at line 1114[14.6608]→[11.1878:1994](∅→∅),[11.1878]→[11.1878:1994](∅→∅),[11.1994]→[15.22:86](∅→∅),[15.86]→[14.6609:6720](∅→∅),[11.2020]→[14.6609:6720](∅→∅)
FileEditorContent::Decoded(content) => el(text_editor(content,).wrapping(text::Wrapping::WordOrGlyph).on_action(|action| Message::UntrackedFileContentsAction{path: path.clone(),action})),FileEditorContent::Decoded(content) => {let path_buf = PathBuf::from(path);let file_ext = path_buf.extension().and_then(ffi::OsStr::to_str);let editor = text_editor(content).wrapping(text::Wrapping::WordOrGlyph).on_action(|action|Message::UntrackedFileContentsAction{path: path.clone(), action});if let Some(file_ext) = file_ext {el(editor.highlight(file_ext, highlighter::Theme::SolarizedDark))} else {el(editor)}},