workspace/symbol Fails to Recognize rootPath and Inconsistent Responses Without Debugging #949
Unanswered
Papadopulus
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Once the progress notification
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I'm encountering multiple issues with typescript-language-server when using its LSP capabilities, particularly with workspace/symbol and other features like hover, signature_help, implementation, and references. Despite correctly sending the rootUri during the initialize request, the server struggles to recognize the project root and provide complete responses unless specific conditions are met, which seem inefficient or inconsistent.
Steps to Reproduce
Setup:
Test Case:
- Initialize the client with rootUri and call workspace/symbol with a query present in multiple files.
Result: Returns one symbol or none unless didOpen is sent for every file.
- Open a single .ts file with didOpen, then request hover at a symbol without debugging.
Result: Empty or minimal response.
- In debug mode, add a delay (e.g., 1-2 seconds) after send_document_sync and before hover.
Result: Full hover information returned.
Expected Behavior
Actual Behavior
Environment
typescript-language-server version: 4.3.4
OS: Ubuntu 22.04
Project: TypeScript project with tsconfig.json and ~20 .ts files
Questions
Notes
Manually opening all files with didOpen is not a practical solution for larger projects. The inconsistent behavior between debug and non-debug modes suggests a timing or indexing issue on the server side. I’d appreciate any guidance or fixes to make this work reliably.
Beta Was this translation helpful? Give feedback.
All reactions