Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: No <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.73.1 OS Version: Pop!_OS 22.04 LTS Steps to Reproduce: ! It should use the location data which the language server provides if I ctrl+click on the linked part, but instead it runs go to definition for the nearest token (which is colored in addition to the inlay hint part which is under cursor).
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.73.1. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding!
It remains.
cc
Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our . Please take the time to review these and update the issue. Happy Coding!
Steps to reproduce: a language server that supports location links in inlay hints +click on one of the links It will go to the definition of nearest token (the default behaviour of clicking on inlay hints) instead of the link target. It also should not make the nearest token blue and only blue the link part.
Please tell me if there is anything else missing.
I can reproduce it in as well with this code: It creates two inlay hints but ctrl+click on either of them won't go to the .
Thanks. Code sample is the way to go
Can you please reopen this issue? It is not fixed completely yet ()
Thanks for the ping. I didn't really test this. I have up for this. It should reduce confusing and make this less error prone
Thanks! this now works correctly.
Marking as verified due to previous comment.

Discussion:
return editor.invokeWithinContext((editorAccessor) => { const kbService = editorAccessor.get(IContextKeyService); if (kbService.contextMatchesRules(withNullAsUndefined(this.desc.precondition))) { <del> return this.runEditorCommand(editorAccessor, editor!, args); </del> <ins> return this.runEditorCommand(editorAccessor, editor!, ...args); </ins> } }); }

} else if (referenceCount === 1 && altAction) { // already at the only result, run alternative SymbolNavigationAction._activeAlternativeCommands.add(this.desc.id); <del> instaService.invokeFunction((accessor) => altAction!.runEditorCommand(accessor, editor, [editor, arg, range]).finally(() => { </del> <ins> instaService.invokeFunction((accessor) => altAction!.runEditorCommand(accessor, editor, arg, range).finally(() => { </ins> SymbolNavigationAction._activeAlternativeCommands.delete(this.desc.id); }));

const canPeek = !openToSide && editor.getOption(EditorOption.definitionLinkOpensInPeek) && !isInPeek; const action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined }); <del> return action.run(accessor, { model: ref.object.textEditorModel, position: Range.getStartPosition(location.range) }, Range.lift(location.range)); </del> <ins> return action.run(accessor, new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range)), Range.lift(location.range)); </ins> }); ref.dispose();

}); } <del> async runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any[]) { </del> <ins> async runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, arg: any) { </ins> const languageService = accessor.get(ILanguageService); const snippetService = accessor.get(ISnippetsService);

const snippet = await new Promise<Snippet | undefined>((resolve, reject) => { const { lineNumber, column } = editor.getPosition(); <del> const { snippet, name, langId } = Args.fromUser(args[0]); </del> <ins> const { snippet, name, langId } = Args.fromUser(arg); </ins> if (snippet) { return resolve(new Snippet(