Open
Description
Thank you for the bug report
- I am using the latest version of
lsp-mode
related packages. - I checked FAQ and Troubleshooting sections
- You may also try reproduce the issue using clean environment using the following command:
M-x lsp-start-plain
Bug description
I noticed that particular completion items take 1.5 - 2 secs to be inserted.
I traced it down to this:
;; see #3498 typescript-language-server does not provide the
;; proper insertText without resolving.
(if (lsp-completion--find-workspace 'ts-ls)
(lsp-completion--resolve candidate)
candidate))
Pretty much 99% of the 1.5 - 2 sec latency is from lsp-completion--resolve
I know that this was added to support text edits (e.g. auto-imports) etc, but I wonder, how does VSCode do it and not lag for 1 - 2 secs?
Screen.Recording.2025-04-11.at.10.31.30.PM.mov
Steps to reproduce
Try inserting completion items for a Typescript project
Expected behavior
Completion should be almost instant
Which Language Server did you use?
ts-ls
OS
MacOS
Error callstack
N/A (performance issue)
Anything else?
No response