question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TS auto-import not working if completion has not resolved

See original GitHub issue

TS auto-import rely completion resolve to calculate additionalTextEdits, in 2 cases it’s not working:

  1. User pressed arrow key to select other completion item -> Completion resolve request triggered -> User pressed enter to select completion item before completion resolve request finish.
  2. User use mouse to click a not current completion item, completion resolve request never trigger.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jriekencommented, May 18, 2021

@jrieken this sounds like a general problem in VS Code itself. Should a resolve request be triggered in these cases?

We always call resolve but when insertion happens before resolving is done we do a best effort to apply any additional edits after the fact.

0reactions
dbaeumercommented, Oct 24, 2021

I think you need to track down what part of your code is causing this. Best would be to create an extension directly hooking completion and VS Code’s extension API and then ensure that resolve is called. If not, file a issue to VS Code. If it is called but the TS Server doesn’t do the right thing file an issue against the TS server.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript auto-import completion is not coherent with ...
Typescript auto-import completion is not coherent with approach for C# ... If we haven't resolved this issue for you, please report a new...
Read more >
Typescript no longer auto importing suggestions · Issue #63013
Case 2 is still broken. I think we need to make sure that the completion item is resolved when we call _onDidSelectItem in...
Read more >
TypeScript code completion and auto-import not working for ...
Try to auto-import a class from folder platform/desktop-client/src/main/typescript`. What is the expected result? IDEA recognizes the class name and provides ...
Read more >
WebStorm (2021.3) auto-completion and auto-import not ...
During development I use npm link to automatically fetch code changes. The code is running fine, but WebStorm IDE (2021.3) has some problems. ......
Read more >
Fix Python Relative Imports and Auto-completion in VSCode
In this video, you will learn how to properly handle Python relative imports without extending the sys.path. Additionally, you will learn ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found