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

LSP: Inlay hints for multiline pipelines #3291

Open
ascandone opened this issue Jun 18, 2024 · 1 comment
Open

LSP: Inlay hints for multiline pipelines #3291

ascandone opened this issue Jun 18, 2024 · 1 comment
Labels

Comments

@ascandone
Copy link
Contributor

It would be nice to have inlay hints showing the type of each line in a pipeline expression (that span across multiple lines)

This is the way this is shown in Rust:
Screenshot 2024-06-18 at 18 25 21

I have a working POC in this PR

Open questions

  1. in a a |> f() |> ... |> g() expression, should we show a's type? (Rust shows it)
    1. should we show it even if the value if a simple literal (e.g. string or int)?
    2. should we show it even if the value is a variable whose type is a type with the same name? (e.g. html: Html)

Previous attempts

#2319, #2393, #2525

@lpil
Copy link
Member

lpil commented Jun 20, 2024

Sounds good! One thing I want to make sure is that we don't make it too overwhelming with too much information.

should we show it even if the value if a simple literal (e.g. string or int)?

Let's not show it.

should we show it even if the value is a variable whose type is a type with the same name? (e.g. html: Html)

Yes

@ascandone ascandone changed the title Inlay hints for multiline pipelines LSP: Inlay hints for multiline pipelines Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Unfinished
Development

No branches or pull requests

2 participants