cqframework / cql-language-server

A CQL language server compatible with the Language Server Protocol
Apache License 2.0
3 stars 5 forks source link

Hover Information #25

Open JPercival opened 2 years ago

JPercival commented 2 years ago

If I hover over:

[Encounter : "Some Value Set"]

I'd want to see:

Encounter

An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.

related to "Patient" context via "subject"
filtered to "Some Value Set" via "code"

This can be achieved by extracting the type information from the ELM and looking up Model meta-data from the ModelInfo. This needs to be done via the hover function.

Ideally, the hover would be scoped to the narrowest relevant expression. If I hover a function call, I'd want to see type information and documentation. If I hover over a definition, I'd want to see return type information, and so on.

JPercival commented 2 years ago

Relevant LSP Specifcation: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_hover