Repository: vscode
Issue: VSCode does not honor LSP-advertised capabilities when displaying inlay hints menu
Labels: bug,inlay-hints

Type: <b>Bug</b>

I am developing an LSP server for a new language (Move). As you can see [here](https://github.com/MystenLabs/sui/blob/8b7216f3d00da90104410eb7520b6bbcdcfb5eda/external-crates/move/crates/move-analyzer/src/bin/move-analyzer.rs#L66) the server advertises only the following capabilities:
- hover_provider
- completion_provider
- definition_provider
- type_definition_provider
- references_provider
- document_symbol_provider
- inlay_hint_provider

In particular, it does NOT provide:
- implementation_provider
- declaration_provider


This is honored by VSCode when displaying the Ctrl-mouseclick menu on an identifier in the code (in this case it's a name of a struct being defined):

![image](https://github.com/microsoft/vscode/assets/1724397/863f861d-2baa-47ea-8129-2d2af983385a)

However, it is not honored in the menu created when the `location` field of the `InlayHintLabelPart` structure is set to the location of the same identifier (notice that the menu includes `Go to Declaration` and `Go to Implementations`)

![image](https://github.com/microsoft/vscode/assets/1724397/3e9bea40-0ae1-489d-88cd-c9f1a44d1d9c)
 


VS Code version: Code 1.89.1 (Universal) (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:14:24.611Z)
OS version: Darwin arm64 23.5.0
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Apple M1 Max (10 x 24)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|2, 2, 2|
|Memory (System)|64.00GB (17.07GB free)|
|Process Argv|--crash-reporter-id 12e56b57-2afd-4175-900f-bc67a6eeca41|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (2)</summary>

Extension|Author (truncated)|Version
---|---|---
move-syntax|dam|0.6.0
move|mys|1.0.3


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
vscrp:30673768
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
chatpanelc:31048052
dsvsc021:30996838
01bff139:31013167
pythoncenvpt:31049070
fchga941:31046352
dvdeprecationcf:31052040
pythonprt:31056678
dwnewjupyter:31046869
26j00206:31048877

```

</details>

<!-- generated by issue reporter -->