Skip to main content



      Home
Home » Eclipse Projects » Eclipse LSP4J » Trigger textDocument/hover in LSP4E(Unable to trigger a hover request)
Trigger textDocument/hover in LSP4E [message #1803823] Mon, 11 March 2019 10:43
Eclipse UserFriend
This questions does not relate directly to LSP4J, but to the plugin connecting a language server with the Eclipse IDE.
I registered a run configuration with a file ending via the LSP4E plugin, and the language server starts correctly when I open a file and syncs the text files when the file gets edited.

In the LanguageServer.initialized() implementation I registered the hover capability with :

	public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
		
		final InitializeResult res = new InitializeResult(new ServerCapabilities());
		res.getCapabilities().setHoverProvider(Boolean.TRUE);
		res.getCapabilities().setTextDocumentSync(TextDocumentSyncKind.Full);
		.... (more)
		return CompletableFuture.supplyAsync(() -> res);
	}


The server response correctly after initialize :

{"jsonrpc":"2.0","id":"1","result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true}}}

Via the the console jsonrpc message exchange is logged, when I try to rename or jump to definition the appropriate request is made. But not so with the hover request (Im putting the mouse cursor over a text token or select a word). It seems to me, the hover is not triggered by the plugin.

Any ideas would be greatly appreciated.
Next Topic:SLF4J ERROR MESSAGE
Goto Forum:
  


Current Time: Wed May 14 00:32:21 EDT 2025

Powered by FUDForum. Page generated in 0.02529 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top