Skip to content

Support that server can opt-out of requests on non open document #1912

@angelozerr

Description

@angelozerr

Perhaps it is a stupid question, but I have not seen some docmentation about that.

I'm implementing an LSP support for IntelliJ https://github.com/eclipse-lsp4j/lsp4j it starts working well but sometimes my textDocument/* (ex : textDocument/codeLens, textDocument/documentLink) is done before the didOpen.

This usecase comes from only when the language server starts, and takes some times.

It is the reason why I ask the following question : Is didOpen must be done before textDocument/* ?

Perhaps it is natural in vscode, but in my case, the didOpen is done in a Thread (to avoid blocking the IDE) and the call of textDocument/codeLens is done by the implementation of IJ CodeVision where I don't master the call.

I suppose that I need to implement something to consume textDocument/codeLens before the didOpen, but before doing that I would like to be sure that the it is the proper behavior.

If it is the proper behavior, is LSP specification didOpen could mention that didOpen must be done before all textDocument/*? As didOpen is a notification (there is no response) how the LSP client can be sure that didOpen is finished on language server side?

Many thanks for your answer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions