eclipselabs/eclipse-language-service

read result of initialize to decide of features activation

Closed this issue · 3 comments

The current implementation assumes all operations are availablw and request them to LS anyway. We should rather check the result of the initialization to decide whether to make feature enabled in Eclipse and whether to perform the request.

Goal is to have something like LanguageServerAccessor.getLanguageServer(file, InitializeResult::isHoverProvider) would be good.

Another way would be to expose something like IHoverService, defining only the relevant LS methods, and enable it using the initialization result.

Some features might require disabling stuff in plugin.xml... I don't have any good suggestion about that, at the moment.

Fixed with 9109e12