microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.76k stars 29.1k forks source link

VSCode does not honor LSP-advertised capabilities when displaying inlay hints menu #213330

Open awelc opened 5 months ago

awelc commented 5 months ago

Type: Bug

I am developing an LSP server for a new language (Move). As you can see here the server advertises only the following capabilities:

In particular, it does NOT provide:

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

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

VS Code version: Code 1.89.1 (Universal) (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:14:24.611Z) OS version: Darwin arm64 23.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
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%|
Extensions (2) Extension|Author (truncated)|Version ---|---|--- move-syntax|dam|0.6.0 move|mys|1.0.3
A/B Experiments ``` 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 ```
awelc commented 5 months ago

Any update on this? It would be good to know if it's considered a problem or it is for some reason the way it should be

awelc commented 3 months ago

@jrieken, any update on this? The first thing that would be good to know if it's even considered a bug

awelc commented 2 months ago

Trying again to get any kind of feedback on this (@jrieken?)

awelc commented 1 month ago

I have been trying to get any kind of response (e.g., is it even a bug or not) on this for a while so out of desperation I am tagging some other maintainers here that responded to other issues in this repo in the hope that I can get some feedback. My apologies but I am not sure what else I can do (@meganrogge, @roblourens @lszomoru ?)