textDocument/codeLens request hangs on the first file opened
Describe the bug
When opening a file and the server starts for that file, it registers the code lens capability dynamically. The Sublime Text client does a textDocument/codeLens request immediately after the registration is complete, but no response is ever received. Subsequent openings from other files do work.
Expected Behavior
The server should respond to the request eventually.
Current Behavior
The server never responds to the request, leaking memory.
Steps to Reproduce
- Download ST4
- Download LSP package
- Download LSP-yaml package
- Open a yaml file with a known schema (like a github workflow file)
- See that no code lens appears at the top of the file.
- Open a similar file.
- See that a code lens appears.
Environment
- [x] Windows
- [x] Mac
- [x] Linux
@rwols I finally found the time to investigate this, yaml-ls DO return (empty) value for textDocument/codeLens request on first file open, it because JSON schemas not initialised on that time when ST call for codeLens.
I thinking to change codeLens to wait on schemas initialisation.