I would like to get completions in my pubspec file.
I just spend 60 minutes debugging, in the end finding that I wrote transformer: instead of transformers:. I have now made very basic completions using live templates in webstorm. Just completing all the different keys you can have in pubspec (name, environment,transformers, dependencies etc.).
Maybe it would be nice if the DAS would show completion in a pubspec file ? Of course, it would also be very useful if it would complete package names. And suggest version constraints.
Additional killer feature would be to find package usages. I mean invoke Find Usages on a package declaration in pubspec and find all imports/exports where this package is imported/exported.
This came up in conversation recently... Glad I'm rediscovering this bug.
As I understand it, @bwilkerson, the analysis plumbing is there right? (I'm not suggesting this to be trivial; just wondering if some of the foundation is there.)
A simple improvement would be to get known keys highlighted in a different color or bold font.
So if there is a typo or indentation is wrong it's immediately obvious that something is wrong.
With build stuff like transformers out of pubspec.yaml this should now be much easier.
On the other side, you could extend this issue to build[.xxx].yaml files to make it a real challenge again ;p
Yes, we can fairly easily support this on the server side. There would also be work to do on the client side (currently the client won't ask server for suggestions).
We do have support for generating errors, and we have some error checking implemented but more could be done. I know the errors show up in the analysis view (in IntelliJ), but I can't remember whether they are displayed in-line. And I don't know the state of VS Code support.
Adding analysis support for build files is an interesting idea. Community contributions would be welcome, given that we aren't likely to have the resources for it any time soon.
Most helpful comment
Yes, we can fairly easily support this on the server side. There would also be work to do on the client side (currently the client won't ask server for suggestions).
We do have support for generating errors, and we have some error checking implemented but more could be done. I know the errors show up in the analysis view (in IntelliJ), but I can't remember whether they are displayed in-line. And I don't know the state of VS Code support.
Adding analysis support for build files is an interesting idea. Community contributions would be welcome, given that we aren't likely to have the resources for it any time soon.