New Assist: From/To cfg_attr #13965
Labels
A-assists
C-feature
Category: feature request
S-actionable
Someone could pick this issue up and work on it right now
Wrapping an attribute into
#[cfg_attr
isn't a lot of work, but can be tedious nonetheless.I propose an assist that will convert
and back
Obviously, the back direction is lossy.
This would play quite well with e.g. #13935 allowing to convert a doc comment in two steps to a conditional doc attribute.
As I'm quite new to rust-analyzer I'm not sure if this would need to somehow understand weather
cfg_attr
is actuallycfg_attr
or some custom attribute macro, which could complicate things. But other than that, this should be pretty simple to implement.The text was updated successfully, but these errors were encountered: