Skip to main content

listing_element_for

Function listing_element_for 

Source
pub fn listing_element_for(path: &Path, is_dir: bool) -> &'static str
Expand description

Which listing.* element a row resolves to.

DL.3b: this is the replacement for ext_color’s runtime lookup. ext_color answers “what RGB is a .rs file” and a theme cannot touch the answer; this answers “which registered element is it”, and the theme owns what that element looks like.

Buckets are language families, not extensions — the vocabulary a theme is asked to retune should be the one a person thinks in.