oni icon indicating copy to clipboard operation
oni copied to clipboard

Support LSP styling with markdown

Open badosu opened this issue 7 years ago • 7 comments

I am not sure if this is an expected behaviour for a LSP implementation, but solargraph returns results formatted in markdown:

2018-09-04-002015_3840x2160_scrot

badosu avatar Sep 04 '18 03:09 badosu

@badosu it is expected that it should return results as markdown and we actual used marked to render the markdown that comes into the hover tooltip, I made a PR https://github.com/onivim/oni/pull/1253 relating to that a while ago although I think we never got round to adding it to the autocomplete (just had a look at the code and its not properly hooked up here, it should work something like this)

akinsho avatar Sep 04 '18 06:09 akinsho

Think this is actually a good first issue since all the pieces are in place and we can just replicate what we did for the hover tooltip if anyone wants to have a look just just @ me and i'll point you in the right direction

akinsho avatar Sep 04 '18 07:09 akinsho

Hi, I want to take a stab at this. Can use some guidance. @Akin909

hindol avatar Sep 08 '18 13:09 hindol

@Hindol that would be amazing thanks 👍 re. how to implement this I suggest initially having a look at the Hover Renderer we use a function called convertMarkdown from markdown.ts you shouldn't need to change that functionality at all instead I would use it in ContextMenuContainer.tsx here atm we pass completely unformatted text to the component to render but I'd suggest running convertMarkdown (this return html btw which you will have to dangerouslySetInnerHtml another example where a similar thing happens is here, keep in mind that the tokenStyles prop isnt relevant to this issue

akinsho avatar Sep 09 '18 14:09 akinsho

I am on it. Just had everything set up.

hindol avatar Sep 15 '18 10:09 hindol

Any updates on this? This would go such a long way in making things look better.

taylorthurlow avatar Feb 17 '19 23:02 taylorthurlow

@taylorthurlow Hi sorry, I left it midway. Feel free to try yourself.

hindol avatar Mar 19 '19 13:03 hindol