-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat(lsp): add import completions #9821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks great. Just tried this out locally, and have a few remarks:
- Only files that have previously been opened show up in completions. This is somewhat unexpected from a user point of view. I would expect that entering
./
would complete all sibling files in the directory, not just files that have previously been opened. - I think in a later pass it would make sense to autocomplete all remote imports that are already cached in DENO_DIR, not just ones in the current workspaces' module graph.
Feels great to use though. Completions are snappy, even on a debug build.
Thinking about this, the cache is a one way hash, so that would be hard. |
2d78135
to
e9ed4bc
Compare
The meta files contain the original URL if I'm not mistaken. |
Tried it out locally again and found a few more issues: broken_completions.mp4 |
Hrmmm... opening every metafile, parsing it, and extracting the URL won't be fast. We can be smart by host, but that is as deep as it can go, and we can obviously cache it, but still... |
Ok, I think I know what is going on. |
e9ed4bc
to
0093dd1
Compare
@lucacasonato ok, I think they are fixed... it was a bit of a battle to get the |
Tried again, and one issue is still present. I can not trigger completions in the middle of a file / folder name. For example I enter Screen.Recording.2021-03-24.at.00.57.51.movCould not reproduce the other issue anymore 👍 |
8ffd0dc
to
38e00b9
Compare
ok @lucacasonato here we go again... I think this fixes what you mentioned above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it again, and behaves like I expect now 💯
Awesome work on this!
No description provided.