seblj / nvim-lsp-extras

Some extra functionality I use to make neovim lsp a bit better
MIT License
7 stars 1 forks source link

A possibility for collaboration #2

Closed litoj closed 10 months ago

litoj commented 10 months ago

Hi, I just noticed we are both working on plugins with a similar goal. Currently I'm working on finding the right way to show and choose signature help.

We both reform the lsp_docs/lsp_markdown to make it prettier. I only took the approach of writing parsers for the entirety of the individual language docs to achieve a finer control and keep the result as uniform as possible between all supported languages.

Do you think we could join our efforts in some way?

seblj commented 10 months ago

Hmm, I am not sure. Do you have something special in mind? I mostly created this plugin for myself as sort of like a utility plugin for some things that I had in my config for LSP. I also see this plugin as quite complete for me, and don't really have so much interest in adding new features at the moment.

I am also looking to migrate to the built in way of displaying the lsp docs in the future, as the neovim core is now highlighting with treesitter by default. I just use this as a hack for now to not deal with all the whitespaces of vertical padding, as the core team went with a much simpler implementation. I know that there is some talk about adding vertical conceal, and when that is done (hopefully one day), I will probably change to use the built in way, and disable the thing I have implemented here.

Btw: I see you are also overriding vim.lsp.util.convert_input_to_markdown_lines. Just a heads up that it doesn't work as expected to override this method if you are on nightly. You can see my second previous commit on how I did that.

litoj commented 10 months ago

Hmm, I am not sure. Do you have something special in mind? I mostly created this plugin for myself as sort of like a utility plugin for some things that I had in my config for LSP. I also see this plugin as quite complete for me, and don't really have so much interest in adding new features at the moment.

I see. Anyway, your plugin was my inspiration in some places (like url link detection) so in that way you already helped me.

Btw: I see you are also overriding vim.lsp.util.convert_input_to_markdown_lines. Just a heads up that it doesn't work as expected to override this method if you are on nightly. You can see my second previous commit on how I did that.

Interesting, I will look into that, thank you.

litoj commented 10 months ago

I might be oblivious, but I really cannot figure out what you meant by unexpected behaviour on overriding that method. For me it worked fine in all places that it should have, but mainly I couldn't find anything related in any of your close previous commits. May I ask for a hint?

seblj commented 10 months ago

Yes, I think I was unclear. The issue on nightly neovim is that open_floating_preview will now not call vim.lsp.util.convert_input_to_markdown_lines anymore. So overriding that method on nightly will not work as expected. To fix this, I have copied the entire open_floating_preview and I override that in my plugin as a major hack to still make it work on nightly

litoj commented 10 months ago

Oh, I had no idea it used to 😅. Though that would explain why I had to add some extra overrides in places I previously didn't find the need to and also why I was seeing the method being called twice before that. Thanks!