lsp-lens.nvim
lsp-lens.nvim copied to clipboard
Feature Request: Allow for custom sections
Introduction
VSCode's codelens functionalities are extensive, and users who want to mimic parts of them cannot because sections are restricted to certain defaults. Allowing the user to define custom sections would be useful for achieving pieces of information that lsp-lens should not have to maintain.
Example
For example, I personally would like to implement something like in the below image, where the user can see how many tests for the current function/method exist and how many are passing. Tools like Neotest may be able to provide the information (if it has an API), but I'd like to display it in the codelens format instead of in the sign or diagnostic columns.
Idea
Much like statuscol.nvim, lsp-lens.nvim could use a table of sections with some defaults that are built-in, such as "references", "definitions", and so on (it already does this 👍🏻). It could also allow the user to define custom sections that will be evaluated and return a string.
If this is interesting, I'd be interested in working on it. Maybe lsp-lens
could expand to more than just LSP, like you are doing with the git author provider you mentioned here.
It's really interesting! This will made the plugin more useful and I think it need to split some current code that I also want to do.
Awesome! If it is okay with you, I would like to work on a basic implementation and discuss it here. This implementation will include setting up a process that turns a table of sections into the codelens string. I am decently familiar with this codebase, but I don't know yet how much work would be required for this. To be honest, I think most of it is already done.
It's okay. Just do it. 😊