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 MarkupContent to HoverResponse #148

Merged
merged 11 commits into from
Apr 19, 2019
Merged

Add MarkupContent to HoverResponse #148

merged 11 commits into from
Apr 19, 2019

Conversation

alanz
Copy link
Collaborator

@alanz alanz commented Apr 16, 2019

And deprecate the old MarkedString as per the LSP spec.

Closes #141

Addresses some of #134

And deprecate the old MarkedString as per the LSP spec.

Closes #141

Addresses some of #134
@alanz alanz requested review from lukel97 and wz1000 April 16, 2019 19:36
instance Semigroup MarkupContent where
MarkupContent MkPlainText s1 <> MarkupContent MkPlainText s2 = MarkupContent MkPlainText (s1 <> s2)
MarkupContent MkMarkdown s1 <> MarkupContent _ s2 = MarkupContent MkMarkdown (s1 <> s2)
MarkupContent _ s1 <> MarkupContent MkMarkdown s2 = MarkupContent MkMarkdown (s1 <> s2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice touch 😃

haskell-lsp-types/haskell-lsp-types.cabal Show resolved Hide resolved
And add Monoid instance for HoverContents too, so it is easy to
combine results from multiple sources.

It may be necessary to tweak a separator used in combining, it is
currently just \n.
ChangeLog.md Outdated Show resolved Hide resolved
@alanz alanz merged commit e782320 into master Apr 19, 2019
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.

Null on Hover result
2 participants