Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add inlay hints lsp-test support #575

Merged
merged 3 commits into from
May 19, 2024

Conversation

jetjinser
Copy link
Contributor

@jetjinser jetjinser commented May 16, 2024

new:

  • getInlayHints
  • getAndResolveInlayHints
  • resolveInlayHint (helper)

getAndResolveInlayHints :: TextDocumentIdentifier -> Range -> Session [InlayHint]
getAndResolveInlayHints tId range = do
inlayHints <- getInlayHints tId range
for inlayHints $ \inlayHint -> if isJust (inlayHint ^. L.data_) then resolveInlayHint inlayHint else pure inlayHint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this should probably actually check the server capability for resolving inlay hints, same where we do this for other resolution things. I can't remember whether it's easy to get the server capabilities in lsp-test, so okay to leave it like this for now unless you feel like fixing it. I'll make an issue.

@michaelpj michaelpj merged commit e6d5c5d into haskell:master May 19, 2024
16 checks passed
@jetjinser jetjinser deleted the inlay-hints-test branch May 29, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants