microsoft / vscode-languageserver-node

Language server protocol implementation for VSCode. This allows implementing language services in JS/TS running on node.js
MIT License
1.45k stars 325 forks source link

Document links not rendering in editor despite being correctly returned from the language server #1492

Open benjamin-t-santos opened 3 months ago

benjamin-t-santos commented 3 months ago

We use document links in our language server to link statements in our program to external files. These statements are linked to files according to a configuration file. The configuration file specifies the directories to search, so when the configuration file is modified, we want the document links to be updated.

After the configuration file is modified, the client sends a textDocument/documentLink request and receives a response back from the server. The response is correct and includes the new ranges, but these document links are not displayed in the file.

Screenshot 2024-06-06 at 10 48 25 AM Screenshot 2024-06-06 at 10 49 37 AM Screenshot 2024-06-06 at 10 53 51 AM

(I've tried to include the column/line number to show that the document links are not present at the ranges).

I notice that after I make an edit to the program (such as adding a space or deleting a character/undoing the deletion), the document links appear. But I do not understand why they are not appearing in the editor after the response is received.