I have issues, but how do I get other LSP features?

I just started making some LSP extensions for Nova, and they seem to be running and I get issues to pop up in a sidebar, but I don’t get any other features like auto complete, jump to definition, hover over classes/variable. I am not sure if there are things I am missing, in either the Syntax files or do I need Completion files for that? Anyone have advice?

Here’s what the one LSP’s debug shows from initialize:

Received JSON-RPC response: number(0) initialize
{
  "jsonrpc" : "2.0",
  "result" : {
    "capabilities" : {
      "signatureHelpProvider" : {
        "triggerCharacters" : [
          "(",
          ","
        ]
      },
      "hoverProvider" : true,
      "implementationProvider" : true,
      "codeActionProvider" : {
        "codeActionKinds" : [
          "quickfix",
          "refactor",
          "refactor.rewrite",
          "source.organizeImports"
        ]
      },
      "definitionProvider" : true,
      "renameProvider" : true,
      "documentHighlightProvider" : false,
      "documentSymbolProvider" : true,
      "typeDefinitionProvider" : true,
      "executeCommandProvider" : {
        "commands" : [
          "as3mxml.addImport",
          "as3mxml.addMXMLNamespace",
          "as3mxml.organizeImportsInUri",
          "as3mxml.organizeImportsInDirectory",
          "as3mxml.quickCompile",
          "as3mxml.getActiveProjectURIs"
        ]
      },
      "completionProvider" : {
        "triggerCharacters" : [
          ".",
          ":",
          " ",
          "<"
        ]
      },
      "documentRangeFormattingProvider" : false,
      "documentFormattingProvider" : true,
      "referencesProvider" : true,
      "textDocumentSync" : 2,
      "workspaceSymbolProvider" : true,
      "workspace" : {
        "workspaceFolders" : {
          "changeNotifications" : true,
          "supported" : true
        }
      }
    }
  },
  "id" : 0
}

Anyone have a good place or example of how to check if some of these feature are being called? Can I override something to see if code completing is actually sending or getting a response?

After playing around a lot more, and in the newer version of Nova, I noticed that for one extension I was working on, Jump to Definition was working. But still no hovers or completion. I figured I could try to compare the LSP debug output from VSCode, and tried issuing the same LSP commands from Nova for at least hovering. So I wired up a command to fire from the extension menu based on where the mouse is, and then I had to convert the position using a range to LSP range like this:

nova.commands.register("as3mxml.hovertest", (editor) => {
    if (nova.inDevMode()) { console.log("Called... as3mxml.hovertest"); }

	if(langserver) {
        var position = rangeToLspRange(nova.workspace.activeTextEditor.document, nova.workspace.activeTextEditor.selectedRange);

        langserver.languageClient.sendRequest("textDocument/hover", {
			textDocument: { uri: nova.workspace.activeTextEditor.document.uri },
            position: position.start
        }).then((result) => {
            if(result!==true) {
                showNotification("Hover Test", result.contents.value);
            }
        }, (error) => {
            showNotification("Hover Test ERROR!", error);
        });
    }
});

function rangeToLspRange(document, range) {
	const fullContents = document.getTextInRange(new Range(0, document.length));

	let chars = 0;
	let startLspRange;

	const lines = fullContents.split(document.eol);

	for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {
		const lineLength = lines[lineIndex].length + document.eol.length;
		if (!startLspRange && chars + lineLength >= range.start) {
			const character = range.start - chars;
			startLspRange = { line: lineIndex, character };
		}
		if (startLspRange && chars + lineLength >= range.end) {
			const character = range.end - chars;
			return {
				start: startLspRange,
				end: { line: lineIndex, character },
			};
		}
		chars += lineLength;
	}
	return null;
};

And it returns the correct markdown content. Anyone know how I can make Nova show this content in a hover? Is it that I have to create my own hover provider or can I override something?

I just checked with the developer of the LSP, and according to the responses, it should be initialized and ready to send responses on hover and completions, but in Nova it’s a no go. Is there something else I need to do on Nova’s end to start triggering these events?

Once I changed <syntax> attribute of name to what was passed to the clientOptions, then the hovers, code action and code completions popped up!