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.
pull/3340/head
Michael Davis 2 years ago committed by GitHub
parent ee1214d6e5
commit f32c05db85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

Loading…
Cancel
Save