aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorMichael Davis2022-08-05 00:11:31 +0000
committerGitHub2022-08-05 00:11:31 +0000
commitf32c05db857c61fddb45b66d2ca1de2bd70b7db2 (patch)
tree4d6faa8e7f904f754519d8f833662482feef60da /helix-term/src
parentee1214d6e5d8873f96d496709a8723de0e719367 (diff)
Detect indent-style in `:set-language` (#3330)
Indent style may change when choosing a language with `:set-language`. Line-endings most likely will not change, but `:set-language` should have a similar effect as reloading a file (`:reload`), plus the two are currently grouped in the implementation and line-ending detection is not particularly expensive.
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands/typed.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index dbf7cb24..ad4e7f4c 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -1254,6 +1254,7 @@ fn language(
let doc = doc_mut!(cx.editor);
doc.set_language_by_language_id(&args[0], cx.editor.syn_loader.clone());
+ doc.detect_indent_and_line_ending();
let id = doc.id();
cx.editor.refresh_language_server(id);