@@ -138,6 +138,7 @@ where
138138 helix_view::editor::StatusLineElement::Spinner => render_lsp_spinner,
139139 helix_view::editor::StatusLineElement::FileName => render_file_name,
140140 helix_view::editor::StatusLineElement::FileEncoding => render_file_encoding,
141+ helix_view::editor::StatusLineElement::FileLineEnding => render_file_line_ending,
141142 helix_view::editor::StatusLineElement::FileType => render_file_type,
142143 helix_view::editor::StatusLineElement::Diagnostics => render_diagnostics,
143144 helix_view::editor::StatusLineElement::Selections => render_selections,
@@ -280,6 +281,31 @@ where
280281 }
281282}
282283
284+fn render_file_line_ending<F>(context: &mut RenderContext, write: F)
285+where
286+ F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
287+{
288+ use helix_core::LineEnding::*;
289+ let line_ending = match context.doc.line_ending {
290+ Crlf => "CRLF",
291+ LF => "LF",
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
304+ };
305+
306+ write(context, format!(" {} ", line_ending), None);
307+}
308+
283309fn render_file_type<F>(context: &mut RenderContext, write: F)
284310where
285311 F: Fn(&mut RenderContext, String, Option<Style>) + Copy,