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

Pipeline hints #91

Open
KennethHoff opened this issue Dec 17, 2024 · 6 comments
Open

Pipeline hints #91

KennethHoff opened this issue Dec 17, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request upstream

Comments

@KennethHoff
Copy link

Is your feature request related to a problem? Please describe.
Hey, I recently started learning functional programming and F# - and by extension just recently started using this plugin. There is one thing that I would love to have, and seems to be at least partially supported already, and that's pipeline hints.

Describe the solution you'd like
I want to be able to see type annotations at the end of each line like the following image. Ideally configured separately from Inlay hints so that people who want one or the other can choose.

Image

Additional context
Enabling inlay hints shows something similar to what I want, but for variables instead.

Image

This seems to already be supported in the VsCode plugin, at least according to the following image from this Pull Request from 2022

Image

@KennethHoff KennethHoff added the enhancement New feature or request label Dec 17, 2024
@cannorin
Copy link
Member

This feature is implemented as a custom API fsharp/pipelineHint which is not a part of standard LSP. We would have to implement it from scratch unless Neovim provides some APIs to display arbitrary strings as if they were actual code lenses.

@KennethHoff
Copy link
Author

KennethHoff commented Dec 18, 2024

I figured that this was the case since this wasn't already implemented, and since it was near-impossible to find anything about on Google - for any language. The only thing I found was the ionide vscode plugin. Maybe this concept has a name that I was unable to find any reference to.

That said though; What about the []<string> | 2 references thing? Is that not an arbitrary string? What is causing that text to appear?

@cannorin
Copy link
Member

[]<string> | 2 references is a CodeLens (textDocument/codeLens), which is actually a part of standard LSP. Neovim is capable of displaying it because of that.

@KennethHoff
Copy link
Author

Is there anything I can do to help here?

Do we need to get Microsoft to update LSP to support this (which, assuming we started today, would not happen for at least a year probably), get Neovim to support that new protocol (which would probably support it quite quickly; maybe even before it's official), and then finally for you guys to integrate with neovim?

While that's certainly the ideal outcome, it's also incredibly slow and could potentially never happen.

@KennethHoff
Copy link
Author

I just created an LSP proposal here. Would be nice to get your opinion on the topic to help kickstart the discussion.

@cannorin
Copy link
Member

I guess it's a lot faster and easier to modify FSAC to use inlay hints to also display pipeline hints. It should be able to add an option to choose which kind of hints to display (e.g. argument hints, pipeline hints, ...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream
Projects
None yet
Development

No branches or pull requests

2 participants