Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Allow for custom sections #28

Open
mcauley-penney opened this issue Oct 29, 2023 · 3 comments
Open

Feature Request: Allow for custom sections #28

mcauley-penney opened this issue Oct 29, 2023 · 3 comments

Comments

@mcauley-penney
Copy link

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.

image
Image Source

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.

@VidocqH
Copy link
Owner

VidocqH commented Oct 29, 2023

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.

@mcauley-penney
Copy link
Author

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.

@VidocqH
Copy link
Owner

VidocqH commented Oct 30, 2023

It's okay. Just do it. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants