aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorGuillaume2023-02-16 14:48:35 +0000
committerGitHub2023-02-16 14:48:35 +0000
commit78a1e2db6035b326d7536fbd0fb60f9fc586d978 (patch)
tree183cd41715fe36b1adb13dc3a7e20b2f49f47bb9 /helix-term/src/ui
parenta1a6d5f3340ba8a587bbf8c178fe65589f36a51a (diff)
feat: show current language when no argument is provided (#5895)
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/statusline.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs
index dbb513f8..3e7065b8 100644
--- a/helix-term/src/ui/statusline.rs
+++ b/helix-term/src/ui/statusline.rs
@@ -1,5 +1,6 @@
use helix_core::{coords_at_pos, encoding, Position};
use helix_lsp::lsp::DiagnosticSeverity;
+use helix_view::document::DEFAULT_LANGUAGE_NAME;
use helix_view::{
document::{Mode, SCRATCH_BUFFER_NAME},
graphics::Rect,
@@ -405,7 +406,7 @@ fn render_file_type<F>(context: &mut RenderContext, write: F)
where
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
{
- let file_type = context.doc.language_name().unwrap_or("text");
+ let file_type = context.doc.language_name().unwrap_or(DEFAULT_LANGUAGE_NAME);
write(context, format!(" {} ", file_type), None);
}