You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks.
Looking at it, at least for me, it raises more questions than anything else.
Do you really need those long pipes, to justify showing types on every step.
And if you do, how much added value do you get, in particular in terms of removing resources for building some other features and prioritise this one instead.
It's quite useful imo. i find myself adding intermediate variables in pipelines when reading code to actually see what is happening.
About priority, I think it's not a high priority feature. I'm exploring features from other extensions/language-server to see how can we improve experience of rescript extension i'm adding my ideas here to achieve this in long term. For now I think stablizing current features is more important.
There's an issue on syntax repo about smart printing pipelines.
speaking of lens fot let bindings , I also think that's an improvement we can work on but for me hover is enough for let bindings but hovering on pipelines do not give enough information.
The pipe operator should get tips from ide, but only the first pipe get tips, the second and others get nothing. this make us very tired when coding with some complex library for finding the function of type.
This might be a good issue for a new contributor to experiment with. We have all we need in the analysis bin I think, just need to put the pieces together.
However, we need to think about whether we can provide a good enough experience given that we don't have continuous type information without saving (and successfully compiling). No way around experimenting with it and seeing how it works in practice, imo.
Please ping me if you'd be interested in taking a stab at this, and we can discuss the details. This work would mainly be in OCaml.
Hey @zth, I'm playing with ocaml and I did some tests.
The behavior is not responsive on save. I need to save twice. I don't know why this happens. When I save once and run it through the CLI the type returned is correct.
We already have a mechanism in the server listening to when compilation finishes. Maybe you could try hooking into that, and dispatch an inlay hint refresh request there as compilation is done?
Activity
cristianoc commentedon May 25, 2021
Is that while you type? Or just like code lenses it stays there?
amiralies commentedon May 25, 2021
It stays,
You can give it a try on gitpod with https://github.com/ionide/playground
cristianoc commentedon May 25, 2021
Thanks.
Looking at it, at least for me, it raises more questions than anything else.
Do you really need those long pipes, to justify showing types on every step.
cristianoc commentedon May 25, 2021
And if you do, how much added value do you get, in particular in terms of removing resources for building some other features and prioritise this one instead.
amiralies commentedon May 25, 2021
It's quite useful imo. i find myself adding intermediate variables in pipelines when reading code to actually see what is happening.
About priority, I think it's not a high priority feature. I'm exploring features from other extensions/language-server to see how can we improve experience of rescript extension i'm adding my ideas here to achieve this in long term. For now I think stablizing current features is more important.
just getting started
alarbada commentedon Sep 6, 2021
Unfortunately with the current rescript pipe formatting this enhancement is impossible:
Gets formatted into:
However, maybe codelens could be implemented for let declarations, like the vscode-ocaml-platform plugin does:

(Sorry for the bad quality, image gotten from here)
I don't know how difficult is this to implement, it looks easier to me than @amiralies suggestion, and it is quite helpful aswell.
What do you guys think?
amiralies commentedon Sep 6, 2021
There's an issue on syntax repo about smart printing pipelines.
speaking of lens fot let bindings , I also think that's an improvement we can work on but for me hover is enough for let bindings but hovering on pipelines do not give enough information.
Mng12345 commentedon Dec 15, 2021
The pipe operator should get tips from ide, but only the first pipe get tips, the second and others get nothing. this make us very tired when coding with some complex library for finding the function of type.
aspeddro commentedon May 23, 2022
This feature is specified in LSP version 3.17. See textDocument/inlayHint Request.
rust_analyzerandtsserveralready implemented type hint.zth commentedon Jun 2, 2022
This might be a good issue for a new contributor to experiment with. We have all we need in the analysis bin I think, just need to put the pieces together.
However, we need to think about whether we can provide a good enough experience given that we don't have continuous type information without saving (and successfully compiling). No way around experimenting with it and seeing how it works in practice, imo.
Please ping me if you'd be interested in taking a stab at this, and we can discuss the details. This work would mainly be in OCaml.
aspeddro commentedon Jun 10, 2022
Hey @zth, I'm playing with ocaml and I did some tests.
The behavior is not responsive on save. I need to save twice. I don't know why this happens. When I save once and run it through the CLI the type returned is correct.
0and0is a range for full lines.screencast-2022-06-10_02.46.13.mp4
zth commentedon Jun 10, 2022
Very cool!! Great work! 😄
I think we can leverage the "inlay hint refresh" LSP request here: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_inlayHint_refresh
We already have a mechanism in the server listening to when compilation finishes. Maybe you could try hooking into that, and dispatch an inlay hint refresh request there as compilation is done?
zth commentedon Jun 10, 2022
@aspeddro let me know if you need help with that btw, I'd be happy to fix that. If so, open a PR with your changes and I can edit it there.
aspeddro commentedon Jun 10, 2022
@zth ok.
I'm fixing vscode, I had to update dependencies so everything was breaking.
moving forward.