mirror of https://github.com/AMT-Cheif/drift.git
1.2 KiB
1.2 KiB
Playground to test the analyzer plugin for .moor
files.
Playing around with this
At the moment, DartCode with version v3.4.0-beta.2
is needed to run the
plugin. To set up the plugin, run the following steps
- Change the file
moor/tools/analyzer_plugin/pubspec.yaml
so that thedependency_overrides
section points to the location where you cloned this repository. This is needed because we can't use relative paths for dependencies in analyzer plugins yet. - In VS Code, change
dart.additionalAnalyzerFileExtensions
to includemoor
files:{ "dart.additionalAnalyzerFileExtensions": [ "moor" ] }
- If you already had the project open, close and re-open VS Code. Otherwise, simply open this project.
- Type around in a
.moor
file - notice how you still don't get syntax highlighting because VS Code required a static grammar for files and can't use a language server for that :(
Debugging plugins is not fun. See the docs on some general guidance, and good luck. Enabling the analyzer diagnostics server can help.