Issafalcon / lsp-overloads.nvim

Extends the native nvim-lsp handlers to allow easier navigation through method overloads.
MIT License
88 stars 4 forks source link

Markdown rendering has no indentation #39

Closed NullVoxPopuli closed 3 months ago

NullVoxPopuli commented 3 months ago

image

is this fixable by me somehow? or is this a bug? thanks!

Issafalcon commented 3 months ago

Hi @NullVoxPopuli - Thanks for highlighting this.

I believe this is just something that is out of the control of either yourself, as a user of this plugin, or me as the maintainer. The content of the signature help comes from the LSP requests, and I am leveraging the core neovim codebase, which converts this to markdown (I use the same code with a tweak to add the Overloads information at the bottom).

Therefore, it relies solely on the way the signature help content itself is indented. If the LSP server doesn't indent the content, it won't be indented in the signature popup.

Of course, it isn't impossible to modify this, but it would require more work than I would be willing to put into this feature at the moment. It also would need to deal with the possible inconsistencies of the signature help MarkupKind (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#markupContent) that could be returned. The parser would also then need to be able to format the code blocks according to a specific language formatter that would need to be made available to the plugin somehow (meaning more dependencies for this very small plugin).

Issafalcon commented 3 months ago

I'll close this issue as it isn't something that is in the scope of this plugin to fix.