You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for bringing references with copy/pastes #351
blocked on vs code / lsp / dapRequires a change in VS Code to progressin editorRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
We'd need microsoft/vscode#30066 in order to do this; but the analysis server is getting the ability to request imports that affect a range of code. We can use this during a Copy operation to stash the list (we should also stash the text being copied, to protect against external clipboard changes between copy/paste operations in Code) and then fetch the edits required to add those imports during a paste.
Unfortunately if your plan was to work on this issue, it's currently blocked by not having the required APIs in VS Code and LSP to handle copy/pasting.
I just saw your comment on microsoft/vscode#30066. The API in VS Code is still only "proposed" so it's not yet usable in a shipping extension (it's only for testing). However we're also using LSP here, so we'd also need to wait for it to become part of LSP, and added to the LSP client (or, if it seems unlikely to be added to LSP, we would need to add custom messages).
In either case, there would need to be some work in the Dart analysis server (either to implement the new LSP messages, or to implement custom messages that the extension could call).
This shouldn't deter you from contributing, but this particular issue might not be the simplest one to get started with.
It's unfortunately not yet, TS is allowed to use proposed APIs but we cannot 🙃
They did say that they hope to finalize it in the new year - however, we also need to get it into LSP to avoid implementing it twice - so once it's finalized in VS Code, there will be some LSP (spec/VS Code LSP client) work first, then we need an LSP version to ship, then we can implement it in the Dart server.
If the LSP work misses the next LSP release (which it might, since I think that's on the verge of releasing), then we might want to consider custom requests in the meantime.
blocked on vs code / lsp / dapRequires a change in VS Code to progressin editorRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
Activity
DanTup commentedon Sep 24, 2022
@badaszszsz there are notes in https://github.com/Dart-Code/Dart-Code/blob/master/CONTRIBUTING.md about how to contribute (including running the extension from source).
Unfortunately if your plan was to work on this issue, it's currently blocked by not having the required APIs in VS Code and LSP to handle copy/pasting.
DanTup commentedon Sep 24, 2022
I just saw your comment on microsoft/vscode#30066. The API in VS Code is still only "proposed" so it's not yet usable in a shipping extension (it's only for testing). However we're also using LSP here, so we'd also need to wait for it to become part of LSP, and added to the LSP client (or, if it seems unlikely to be added to LSP, we would need to add custom messages).
In either case, there would need to be some work in the Dart analysis server (either to implement the new LSP messages, or to implement custom messages that the extension could call).
This shouldn't deter you from contributing, but this particular issue might not be the simplest one to get started with.
lukehutch commentedon Dec 12, 2024
The latest stable release of VS code added import auto-add for pasted code, for JS and TS, so it should be possible now.
DanTup commentedon Dec 12, 2024
It's unfortunately not yet, TS is allowed to use proposed APIs but we cannot 🙃
They did say that they hope to finalize it in the new year - however, we also need to get it into LSP to avoid implementing it twice - so once it's finalized in VS Code, there will be some LSP (spec/VS Code LSP client) work first, then we need an LSP version to ship, then we can implement it in the Dart server.
If the LSP work misses the next LSP release (which it might, since I think that's on the verge of releasing), then we might want to consider custom requests in the meantime.
DanTup commentedon Dec 12, 2024
LSP issue is here: microsoft/language-server-protocol#2072