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 }}
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.
VSCode has a neat feature which allows importing the specific type for the thing under the cursor via quick fix:
Whilst I notice that whilst this add-on can fix all imports in a file, it doesn't surface quick fixes for each individual missing import.
Is this possible? I wonder if maybe VSCode has some extra magic/private TS LSP APIs available to it which allow it to infer the import path for what looks like an undefined type.
Also, thanks for the amazing work on this!
The text was updated successfully, but these errors were encountered:
There is a code action for that, but in nvim-lsp-ts-utils we had the TSLspImportCurrent command, to import only the package under the cursor. @jose-elias-alvarez will this be available on typescript.nvim?
The equivalent code in nvim-lsp-ts-utils was quite hacky, so there's no clean way to port it over.
Theoretically, what we could do here is filter the returned list of edits before applying them, but the goal of this plugin is to integrate with the language server, not add more off-spec functionality. If you're interested, I think this type of thing would be best implemented upstream.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
VSCode has a neat feature which allows importing the specific type for the thing under the cursor via quick fix:
Whilst I notice that whilst this add-on can fix all imports in a file, it doesn't surface quick fixes for each individual missing import.
Is this possible? I wonder if maybe VSCode has some extra magic/private TS LSP APIs available to it which allow it to infer the import path for what looks like an undefined type.
Also, thanks for the amazing work on this!
The text was updated successfully, but these errors were encountered: