Document why rust-analyzer doesn't show action name in action docs (#23072)

Michael Sloan created

rust-analyzer does not support derive_macro expansion in attributes -
https://github.com/rust-lang/rust-analyzer/issues/8092. This could be
worked around via a proc_macro, but I think it'd be best to just require
docs for every action.

Release Notes:

- N/A

Change summary

crates/gpui/src/action.rs | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

Detailed changes

crates/gpui/src/action.rs 🔗

@@ -252,9 +252,10 @@ impl ActionRegistry {
 macro_rules! actions {
     ($namespace:path, [ $($name:ident),* $(,)? ]) => {
         $(
-            #[doc = "The `"]
+            // Unfortunately rust-analyzer doesn't display the name due to
+            // https://github.com/rust-lang/rust-analyzer/issues/8092
             #[doc = stringify!($name)]
-            #[doc = "` action, see [`gpui::actions!`]"]
+            #[doc = "action generated by `gpui::actions!`"]
             #[derive(::std::clone::Clone,::std::cmp::PartialEq, ::std::default::Default)]
             pub struct $name;
 
@@ -281,9 +282,10 @@ macro_rules! actions {
 #[macro_export]
 macro_rules! action_as {
     ($namespace:path, $name:ident as $visual_name:ident) => {
-        #[doc = "The `"]
+        // Unfortunately rust-analyzer doesn't display the name due to
+        // https://github.com/rust-lang/rust-analyzer/issues/8092
         #[doc = stringify!($name)]
-        #[doc = "` action, see [`gpui::actions!`]"]
+        #[doc = "action generated by `gpui::action_as!`"]
         #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
         pub struct $name;
 
@@ -311,9 +313,10 @@ macro_rules! action_as {
 #[macro_export]
 macro_rules! action_aliases {
     ($namespace:path, $name:ident, [$($alias:ident),* $(,)?]) => {
-        #[doc = "The `"]
+        // Unfortunately rust-analyzer doesn't display the name due to
+        // https://github.com/rust-lang/rust-analyzer/issues/8092
         #[doc = stringify!($name)]
-        #[doc = "` action, see [`gpui::actions!`]"]
+        #[doc = "action, generated by `gpui::action_aliases!`"]
         #[derive(
             ::std::cmp::PartialEq,
             ::std::clone::Clone,