Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Use LSP MarkupContent for generated documentation #1181

Merged
merged 2 commits into from
Apr 19, 2019

Conversation

alanz
Copy link
Collaborator

@alanz alanz commented Apr 19, 2019

The affects the HoverReply message.

All documentation is now returned in markdown, and it renders much better in emacs-lsp.

@alanz alanz requested review from lukel97, wz1000 and fendor April 19, 2019 13:07
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

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

Sorry, for my trailing whitespace. Will configure my editor accordingly.

@alanz
Copy link
Collaborator Author

alanz commented Apr 19, 2019

The appveyor fail looks like a transient networking error, rather than an actual fail. And the linux equivalent passes. So I am going to merge (and hold thumbs).

@alanz alanz merged commit 39bc399 into haskell:master Apr 19, 2019
@infinisil
Copy link
Contributor

I'm not sure if this or #1189 is the cause, but after the 0.9.0.0 update, lsp-ui-sideline started showing the raw markdown format:
2019-05-04_03-54

@alanz
Copy link
Collaborator Author

alanz commented May 4, 2019

I don't have that problem, and I am wondering if its because my emacs config explicitly pulls in markdown-mode.

;; ---------------------------------------------------------------------
;; hie lsp stuff

(package-install 'dash-functional)
(package-install 'haskell-mode)
(package-install 'markdown-mode)
(require 'markdown-mode)
(package-install 'ht)
(package-install 'company-lsp)
(package-install 'yasnippet)
(require 'yasnippet)

;; (add-to-list 'load-path "/home/alanz/mysrc/github/alanz/lsp-mode")
(package-install 'lsp-mode)

;; (add-to-list 'load-path "/home/alanz/mysrc/github/alanz/lsp-ui")
(package-install 'lsp-ui)

;; (add-to-list 'load-path "/home/alanz/mysrc/github/alanz/lsp-haskell")
(package-install 'lsp-haskell)

;; New style client ;;;;;;;;;;;;;;
(require 'lsp)
(require 'lsp-haskell)
(add-hook 'haskell-mode-hook #'lsp)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ---- From
;;   https://github.com/tigersoldier/company-lsp -------
;;   http://company-mode.github.io/
;(package-install 'company-mode)
;(require 'company-mode)
(add-hook 'after-init-hook 'global-company-mode)

(require 'company-lsp)
(push 'company-lsp company-backends)

@alanz
Copy link
Collaborator Author

alanz commented May 4, 2019

FYI, this is what I get

Screenshot from 2019-05-04 10-35-33

@alanz alanz added this to the 2019-04 milestone May 4, 2019
@infinisil
Copy link
Contributor

Doesn't seem to solve it, my config is here and here (there's an implicit package-initialize at the beginning to load all those packages).

I'll probably try to get a minimal example going to reproduce this (but not right now).

@infinisil
Copy link
Contributor

Ahh, so after updating lsp-ui, lsp-mode to latest master and installing markdown-mode, the problem is solved.

So markdown-mode should be a dependency of lsp-haskell probably

@infinisil
Copy link
Contributor

See also emacs-lsp/lsp-ui#172

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants