-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Dart doc shows no result in auto complete for type names and only for static declarations inside them #59724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also, if this needs to add an import, we should agree with adding a doc import here too, I think (@bwilkerson). |
Yes. Doc imports are there for any names referenced only in documentation comments. |
@srawlins comment #59910 (comment):
So for this code, you can differentiate between them: /// A class with [A.foo] and [A.foo()]
class A {
int foo = 0;
A.foo();
} But there is no colouring for |
Ah yeah, that'd be an Analysis Server issue I think. |
For the above:
similar to #59946, this only happens at I was actually trying to fix this myself, but while I was following the structure of I'm unsure of what am I doing differently here. If anyone could help I'd appreciate it. Also unsure of where are the current tests for completion in Dart docs. |
The test looks reasonable to me, at least on the surface. I verified that the comment is associated with the class declaration, so it seems like it ought to be working. The only advice I have is to use the advice in https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/implementation/code_completion.md to debug the problem. |
The completion suggestion gets all the way here but this regex is expecting different names on 207: sdk/pkg/analysis_server/test/client/completion_driver_test.dart Lines 197 to 208 in 5e8bd02
This is probably to avoid huge lists of suggestions here, I'll add this info to the docs for the tests here too. |
Here is the initial CL to add the outline of tests for completion inside dart-docs https://dart-review.googlesource.com/410461. @stereotype441 was suggested as reviewer by the CLI, so if you disagree, please assign someone else. I've added @srawlins because I've seen him working with Dart Docs before and being very familiar with the specs for it. |
As a separate note, the above comment referencing auto-complete not showing up (quoted below), happens above:
Edit: |
I already have a fix for |
I already have the fix for the |
Now last but not least, the fix for the instance members is at https://github.com/fmorschel/sdk/tree/auto-complete-instance. Once the base tests are merged I'll update these last messages with their respective CL links as soon as I open them. Thanks to everyone in this issue and the CL reviewers! |
[email protected] Bug: #59724 Change-Id: Ia2345c77371a58ad0be402daa93642a3f0e53dc7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410461 Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]> Auto-Submit: Felipe Morschel <[email protected]>
Alright, probably last update here. The three new CLs are open and updated above. The last one is medium sized (mostly tests) and the other two are small ones. Thanks again everyone! Edit: Ping @srawlins for reviews 😁 |
[email protected] Bug: #59724 Change-Id: I9a4a7390e71b1e1fd2daa0f3e548f28cd34834cf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411380 Reviewed-by: Samuel Rawlins <[email protected]> Auto-Submit: Felipe Morschel <[email protected]> Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
[email protected] Bug: #59724 Change-Id: I580b39acc96697990b12527aea699cdf09d788e3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411360 Auto-Submit: Felipe Morschel <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]> Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
Repro:
lib.dart
main.dart
See here no items from Dart:
See here only triggering for static methods:
//CC @DanTup
The text was updated successfully, but these errors were encountered: