-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Sticky code windows for contextually relevant code #52734
Comments
This would be incredibly useful for any object based language, making identification at a glance super easy, but the outline provide a very similar function, and this takes up much more screen space. It seems like a nice idea, but has few use cases and likely take a lot of work. Even if the team does approve it, this likely wouldn't even be worked on for a year. If you really want this in the program, I'd recommend making a fork with a pull request to at least demonstrate basic functionality, else nothing will happen with this.. |
That's about what I expected. I figured I'd open a feature request anyway just in case. I'll get started on a fork to demonstrate some use cases. |
Just FYI, we have something that is related on our roadmap: some form of breadcrumb inside editors that will be powered by the same data powering outline. |
@alexandrudima Could you tell us a bit more about this? |
@axefrog Download insiders, configure |
Let's track in #55075 (it has more upvotes at this time). |
I think having 'sticky' code windows at the top and bottom of editors which display a subset of contextually relevant lines of code that are currently out of view could be a very powerful feature.
The logic for identifying these contextually relevant lines could rely on existing code folding identification, which would also make it useful for languages like HTML to identify where the user is within a large tree of tags.
The biggest use case would be displaying all of the namespace, class, function, etc. headers and closing brackets, like in the following mockup.
These code windows should allow simple in-place editing, similar to the Peek Definition or Find All References code windows.
If there are too many lines to comfortably fit the code window, the windows could either become scroll-able or Code could display only the N lines closest to the current viewport.
The sections could also potentially be used for displaying other things like Find/Replace results or lines containing metadata. Language extensions could potentially contribute additional code spans they think are contextually relevant.
This is similar to #41666 but larger and more flexible in scope. It might have similar use cases to #9418.
I would argue that having the actual code for the hierarchy be visible and editable would make it easier for the user to "find their place" at a glance, as well as to make revisions to those lines, e.g. revising parameter signatures while working within a large function body.
The text was updated successfully, but these errors were encountered: