@@ -138,6 +138,7 @@ where
138 helix_view::editor::StatusLineElement::Spinner => render_lsp_spinner,
138 helix_view::editor::StatusLineElement::Spinner => render_lsp_spinner,
139 helix_view::editor::StatusLineElement::FileName => render_file_name,
139 helix_view::editor::StatusLineElement::FileName => render_file_name,
140 helix_view::editor::StatusLineElement::FileEncoding => render_file_encoding,
140 helix_view::editor::StatusLineElement::FileEncoding => render_file_encoding,
141+ helix_view::editor::StatusLineElement::FileLineEnding => render_file_line_ending,
141 helix_view::editor::StatusLineElement::FileType => render_file_type,
142 helix_view::editor::StatusLineElement::FileType => render_file_type,
142 helix_view::editor::StatusLineElement::Diagnostics => render_diagnostics,
143 helix_view::editor::StatusLineElement::Diagnostics => render_diagnostics,
143 helix_view::editor::StatusLineElement::Selections => render_selections,
144 helix_view::editor::StatusLineElement::Selections => render_selections,
@@ -280,6 +281,31 @@ where
284+fn render_file_line_ending<F>(context: &mut RenderContext, write: F)
286+ F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
288+ use helix_core::LineEnding::*;
289+ let line_ending = match context.doc.line_ending {
292+ #[cfg(feature = "unicode-lines")]
293+ VT => "VT", // U+000B -- VerticalTab
294+ #[cfg(feature = "unicode-lines")]
295+ FF => "FF", // U+000C -- FormFeed
296+ #[cfg(feature = "unicode-lines")]
297+ CR => "CR", // U+000D -- CarriageReturn
298+ #[cfg(feature = "unicode-lines")]
299+ Nel => "NEL", // U+0085 -- NextLine
300+ #[cfg(feature = "unicode-lines")]
301+ LS => "LS", // U+2028 -- Line Separator
302+ #[cfg(feature = "unicode-lines")]
303+ PS => "PS", // U+2029 -- ParagraphSeparator
306+ write(context, format!(" {} ", line_ending), None);
283fn render_file_type<F>(context: &mut RenderContext, write: F)
309fn render_file_type<F>(context: &mut RenderContext, write: F)
285 F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
311 F: Fn(&mut RenderContext, String, Option<Style>) + Copy,