This repository is designed to offer:
- Documentation (including examples and constructor signatures) when hovering over Flutter widgets in ClojureDart
- Auto-complete functionality
- Suggest flutter widget paramaters (triggered with dot "." )
- Navigation to the source Flutter file
- A VSCode extension
Currently, the hover and autocomplete features are operational, but requires a few manual setup steps.
- Install Joyride vscode extension
- Copy the
.joyrideanddart_parserdirectories into the root directory of your ClojureDart project. - In the clojuredart projects root directory, run
dart pub getto generate the.dart_tool/package_config.jsonfile. - Run below commands:
cd dart_parser
# this is different from step 3.
dart pub get
# this file is expected by joyride to show docs on hover over panel
dart run gen_docs.dart --project-path PATH_TO_YOUR_PROJECT_ROOT_DIR > /tmp/cljd_flutter_widget_docs.json- Restart your IDE.
- Hover over any Flutter widget name in a
.cljdfile. Note: The name should be formatted asm/Name, for example,m/Text.
- The
gen_docscommand relies on the.dart_tool/package_config.jsonfile to locate the Flutter SDK directory. It searches for the"flutter"entry, so ensure that Flutter is listed as a dependency in your pubspec.yaml file. - The
--project-path PATH_TO_YOUR_PROJECT_ROOT_DIRargument must be an absolute path. - The
/tmp/cljd_flutter_widget_docs.jsonfile is a mapping from widget names to their documentation. Joyride requires this file to display documentation in the hover panel.