flutter / flutter/flutter-intellij
Show/expand Dart templates in source editor
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
Dart supports documentation templates, for example:
```dart
/// This is the dart doc for some property.
///
/// {@template some_template}
/// This explanation is needed many places in our docs, so we wrap it with a
/// template.
/// {@endtemplate}
/// This is another doc for some other property, which replicates our templated
/// doc.
///
/// {@macro some_template}
```
This templating behavior is critical to keep related documentation in sync. However, these templates are a significant nuisance for developers who are working in source code.
I routinely jump into Flutter source to read docs, only to find a `@macro` where I was expecting documentation. I have the same problem in my own source code where macros are used.
I'd like to see one or both of the following in the IDE:
- Source linking for template macro's so that I can `CMD+B` to the definition of the template.
- Automatic IDE expansion of a macro template so that I can read a template inline, as if it were written in the source code docs that I'm reading.
Contributor guide
Assessment
This issue has not been assessed yet.