Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

languages: Add comment injections for Rust (#39714)

Marshall Bowerse60a61f7e76d
diff --git a/crates/languages/src/rust/injections.scm b/crates/languages/src/rust/injections.scm
index 1d346ac36bb..e5921501bc6 100644
--- a/crates/languages/src/rust/injections.scm
+++ b/crates/languages/src/rust/injections.scm
@@ -1,3 +1,6 @@
+((line_comment) @injection.content
+ (#set! injection.language "comment"))
+
(macro_invocation
macro: (identifier) @_macro_name
(#not-any-of? @_macro_name "view" "html")