Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Incorrect formatting, missing text and highlighting errors in documentation #373

Closed
David-Else opened this issue May 13, 2021 · 5 comments · Fixed by #426
Closed

Incorrect formatting, missing text and highlighting errors in documentation #373

David-Else opened this issue May 13, 2021 · 5 comments · Fixed by #426
Labels
bug Something isn't working

Comments

@David-Else
Copy link

David-Else commented May 13, 2021

Describe the bug

Formatting and highlighting is wrong. It looks really bad on all Deno documents, and has the same bugs on each section of the documents.

To Reproduce

Steps to reproduce the behavior with the minimal config:

  1. ... use the Deno language server
  2. ... start typing Deno,con to see the docs for Deno.connect

This is how it looks:

neovim

This is how it should ideally look from VS Code:

code

Note:

  • large empty gap at top
  • "default is" wrongly colored
  • "127.0.0.1" wrongly colored
  • new line after 'named' that should not be there
  • entire code block showing ``` when it should instead apply code block coloring
  • code block ends early and has @@@ inserted wrongly
  • entire last line starting requires is missing

I am using treesitter for my syntax highlighting and have the latest Neovim nightly and nvim-compe. It has always done this, it is not a regression.

EDIT: Is #260 (comment) related to the Markdown problem?

@folke
Copy link
Contributor

folke commented May 22, 2021

Check the linked PR above to see how you can get better formatting of the documentation window.
I changed both the hover and signature_help rendering to use the fancy_floating_markdown instead of the simple renderer.

Would be great to have these changes applied within compe as well.

@hrsh7th
Copy link
Owner

hrsh7th commented May 27, 2021

@David-Else Please try let g:markdown_fenced_languages = ['ts=typescript']

@folke
Copy link
Contributor

folke commented May 27, 2021

@hrsh7th it would still be wrong in that case.

I made some PR's upstream that were merged in the meantime that fixes that for the lsp popups.

I'm currently working on a new PR that consolidates all the floating window methods and will make it easier for other plugins like compe to use the special markdown formatting.

Once that one is merged, I'm willing to create a PR for compe

@David-Else
Copy link
Author

It looks a bit better now, but is still messed up:
Screenshot from 2021-06-20 13-44-22

@folke A PR to use the new Markdown preview mode would be awesome!

@folke
Copy link
Contributor

folke commented Jun 23, 2021

@David-Else PR is ready :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants