-
-
Notifications
You must be signed in to change notification settings - Fork 427
Description
When the project is opened, the editor immediately asks for document symbols. The pony-lsp answers the request with no symbols, if compilation did not finish yet. Only when compilation is done, a document symbol request will have any results.
In zed and vscode, documentsymbols will never be re-fetched for an open file. The file needs to be re-opened for the document symbols to be filled.
So it would be better to not answer the request immediately, but to wait for a first compilation and only then answer the request. This requires to keep some state in the WorkspaceManager. We only need to make sure we only wait when we can expect document symbols from the currently running or the next compilation run. If the last run did only deliver errors and no program AST, we should answer immediately with no document-symbols.