mirror of https://github.com/AMT-Cheif/drift.git
161f7c0203 | ||
---|---|---|
.. | ||
lib | ||
.gitignore | ||
README.md | ||
analysis_options.yaml | ||
pubspec.yaml |
README.md
Playground to test the analyzer plugin for .moor
files.
Currently, we support
- showing errors in moor files
- outline
- (kinda) folding
Setup
To use this plugin, you'll need to perform these steps once. It is assumed that you
have already cloned the moor
repository.
- Clone https://github.com/simolus3/Dart-Code and checkout the
use-custom-file-endings
branch. - Run
npm install
andnpm run build
to verify that everything is working. - Open the forked Dart-Code repo in your regular VS Code installation.
- Press
F5
to run the plugin in another editor instance. All subsequent steps need to be completed in that editor. - In the settings of that editor, change
dart.additionalAnalyzerFileExtensions
to includemoor
files:{ "dart.additionalAnalyzerFileExtensions": ["moor"] }
- Close that editor.
- Uncomment the plugin lines in
analysis_options.yaml
Running
After you completed the setup, these steps will open an editor instance that runs the plugin.
- chdir into
moor_generator
and runlib/plugin.dart
. You can run that file from an IDE if you need debugging capabilities, but starting it from the command line is fine. Keep that script running. - Re-open the "inner" editor with the custom Dart plugin
- Open this folder in the editor that runs the custom Dart plugin. Wait ~15s, you should start to see some log entries in the output of step 1. As soon as they appear, the plugin is ready to go.
Note: lib/plugin.dart
doesn't support multiple clients. Whenever you close or reload the
editor, that script needs to be restarted as well. That script should also be running before
starting the analysis server.