eclipselabs/eclipse-language-service

LS initialization is done with every context menu display

Closed this issue · 5 comments

Like in title.

I cannot reproduce it with the VSCode-JSON language server. LS initialization can typically happen if connection was lost (stream closed or LSP4J reporting an error). An issue on server-side or a bad message can trigger a re-initialization.

Ok, thanks. Maybe something is wrong on my side. I will double check this.

I cleaned/updated all sides of my configuration and everything is ok now. Looks that problem was on my side. Closing.

I tracked this issue. When ProjectSpecificLanguageServerWrapper was initialized but server is not supporting given ServerCapabilities then new instance of ProjectSpecificLanguageServerWrapper will be created and initialization will be done once again.

In my case I'm playing with php LS where refactoring isn't supported and because of that each LanguageServiceAccessor.getLSPDocumentInfoFor(textEditor, (capabilities) -> Boolean.TRUE.equals(capabilities.isRenameProvider())) (handler for rename) will reinitialize LS.

Fixed with 7e1767d , thanks @mniewrzal for doing a huge part of the investigation (and sorry for forgetting to credit in the commit message...)