Rendering of #include hyperlinks in VSCode, between clangd-9 and -11

Debian10 x64, VSCode 1.51.0, vscode-clangd 0.1.8. Compare rendering of #include hyperlinks with clangd-11 (top) vs clangd-9 (bottom):

Compare 11 with 9

The clangd-9 rendering is quite confusing because each directory component (“foo”, “mul”, “h”) appears to render as a separate link. But the clangd-11 rendering shows a single hyperlink. Also with clangd-9 you have to hold down “ctrl” and hover to see the link, whereas with clangd-11, it’s clearly a link even before you go near it. Why this difference in behavior? Is it just that the newer clangd version is providing richer contextual information to the vscode-clangd extension?

I asked the same question on the vscode-clangd FAQ on the VSCode Marketplace, and got this answer:

clangd-11 supports the “document link” feature, which reports the full range+target of all the includes to the client.

clangd-9 does not have this, so navigation still works (via go-to-definition) but the UI is a bit different/limited.

So the nicer rendering with clangd-11 is due to a clangd-11 improvement. Another reason to upgrade!