autozimu / LanguageClient-neovim

Language Server Protocol (LSP) support for vim and neovim.
MIT License
3.55k stars 273 forks source link

Introduce LanguageClient_hoverMarginSize #1111

Closed jez closed 3 years ago

jez commented 3 years ago

The markdown plugin I use has a bunch of regex matching groups that look for certain characters at the start of a line (like ###), and the syntax highlighting breaks when they're not on the start of the line.

We add a single space to the start of every line in a hover comment. I'd like to make that configurable, so that I can get better markdown syntax highlighting.

I've chosen to let the user set how big they want the margin to be as an integer. I'd also be fine with an option that just removes the margin, but this code is actually shorter to write.

martskins commented 3 years ago

Looks good to me! The PR needs to target the dev branch though.

Also, if you could add that configuration variable to the documentation (doc/LanguageClient.txt) that'd be great.

Thank you!

jez commented 3 years ago

The PR needs to target the dev branch though

Done, sorry about that.

Also, if you could add that configuration variable to the documentation (doc/LanguageClient.txt) that'd be great.

Done, thanks for the reminder.

@martskins this should be ready to review now

martskins commented 3 years ago

Brilliant! Thank you for the contribution!