Skip to content

pony-lsp: Document Symbols reported as empty before compilation does not update when compilation is done #4931

@mfelsche

Description

@mfelsche

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discuss during syncShould be discussed during an upcoming synchelp wantedExtra attention is neededpony-lspIssues related to pony-lsp

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions