Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End user-facing error reported when opening a project with restored LSP4IJ editor tabs #733

Open
SCWells72 opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@SCWells72
Copy link
Contributor

I sometimes see this error when opening a project that was closed with active editor tabs associated with an LSP4IJ language server definition:

Error while consuming 'textDocument/foldingRange' with language server 'TypeScript Language Server'
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request textDocument/foldingRange failed with message: The document should be opened for foldingRanges', file: file:///C:/Users/Scott/dev/projects/IlluminatedCloudTestProjects/df17-with-manifest/force-app/main/default/lwc/demoComponent/demoComponent.js
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$start$4(LanguageServerWrapper.java:314)

@angelozerr provided the following thoughts:

This error comes from when textDocument/foldingRange is called BEFORE a didOpen
When IJ is opening, it opens JavaScript file and as your IJ is indexing, the language server is not started
I did that to improve drasticly the performance of startup
when indexing is finished, I refresh folding
but I think that I have missed the didOpen part in some cases

Overall the error sems to be benign, but it is a bit jarring when opening the project.

@angelozerr angelozerr added the bug Something isn't working label Jan 10, 2025
@angelozerr angelozerr self-assigned this Jan 10, 2025
@angelozerr angelozerr moved this to In Progress in Java Tooling Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants