-
-
Notifications
You must be signed in to change notification settings - Fork 277
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: Line lens for pipeline steps #426
Comments
My only reservation is for the trivial scenario like your example code. If I have many functions and each use several pipe operators, the visual length of my file will be nearly doubled (it appears that code lens uses a full line height). I am not opposed to the idea, especially for the non-trivial scenarios, but if there was another way to do this that did not aesthetically bloat my IDE, I personally would prefer that. Sort of like: where you could hover over/click on the dot to see such info? Just a thought. |
I forgot to mention that I'd want to have this feature OFF most of the time, and only toggle it on from time to time when I want to debug. What I was thinking is that it could have its own setting, separate from the global But @czifro's comment made me think of another possibility: toggling the feature only for a certain range of code, say the currently-selected blocks. So I select the pipeline I want to examine more closely, hit whatever shortcut key I've defined (or pick the command from the F1 menu), and the pipeline code lens turns on only for those few lines. |
I must be missing something here. Since when does the code lens work for local declarations? Or do you just turn every local variable into a class / module level declaration when you do this? If that's what you meant, then I would think showing local declarations in code lens should come before pipelines. |
@piaste - You're right. I must not have had VS Code open in front of me when I wrote that, because what I wrote makes no sense. What I meant to write was that I can hover over the |
See my comment in other issue: #422 (comment) |
Now that #510 is merged, I wonder if that might provide a better UI for this idea? The implementation difficulties mentioned in #422 (comment) still apply, though. |
Having played with linelens a little bit, I now would MUCH rather this be implemented with linelens than with codelens, if someone does manage to implement this idea. I've updated the issue description accordingly. |
This is done. |
#422 just gave me an idea. When I write a long, complex pipeline, I will often make a type error somewhere in the pipeline. What I've been doing to solve those type errors is to turn a pipeline into a series of
let
statements, so that the code lens will tell me what type my data is at each step of the pipeline. But it would be useful to be able to get code lens results on intermediate steps of the pipeline. E.g.,would display something like (if the comments below were actually code lens displays):
Of course, in this trivial example, it's easy to follow the types "in your head". But when the pipelines involve more complex types like
async<HttpContext option>
or lists of lists that you're flattening withList.collect id
, or other such complicated scenarios, then having code lens for each step of the pipeline would be handy instead of having to write:UPDATE: as mentioned in a comment below, I'd much rather use linelens now for this than codelens. E.g., I'd like to see something like the following for the trivial example:
With linelens, the drawback that @czifro mentions below would be almost entirely eliminated. (In some cases with long pipeline steps or types, the line lens might cause that one line to wrap, so there would be some cases where it could still increase the visual length of the file).
The text was updated successfully, but these errors were encountered: