dev-cycles / contextive

Get on the same page.
https://contextive.tech
MIT License
257 stars 6 forks source link

Visual Studio: Definitions don't update in hover panels when the definitions file is updated. #79

Open chrissimon-au opened 3 months ago

chrissimon-au commented 3 months ago

Describe the bug In most IDEs when editing the defintions file, the updated definitions appear in the hover panel immediately. In Visual Studio, they don't. This is because Visual Studio supports didChangeWatchedFile notifications, but it doesn't support dynamic registration, which is an approach where the language server can nominate which files to watch. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#didChangeWatchedFilesRegistrationOptions for details.

To Reproduce Open a folder with a .contextive/definitions.yml file, in Visual Studio with Contextive installed. See the hover panel text. Modify a term definition. Hover to see the hover panel, and see the old definition.

Expected behavior The hover panel should show the new definition.

Additional context According to the initialize logs, the language client advertises support for didChangeWatchedFiles with an empty object, which means it doesn't offer dynamic registration.

{
   ...
   "didChangeWatchedFiles": {}
   ...
}
chrissimon-au commented 3 months ago

Tracked in Visual Studio Developer Community here