-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
Minimap: support // Mark meta comments to support custom rendering in the minimap #74843
Comments
Have you tried the setting Suggest to file a separate issue for separator support in the minimap. |
Hm nice. That fixed the nice and clean rectangles :D not great in size still. Also the colors I guess are correct too. So actually what this issue is, is a way to configure the size of the rects, and the support for |
Perhaps this could also support class and method names from file outline. |
Ever since the release of XCode 11, I've wanted this. Really hoping this issue becomes a reality! |
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
Can't find this in the backlog, is it already implemented in the current release? 🤔 |
I found it in the backlog. So glad this will be worked on!! |
@gcamp806 do you have a link for the issue in the backlog? |
@mrousavy the link on the backlog brings you back to this page... On the backlog page, I searched for "Mark meta" and had to keep scrolling for github to load more of the page. The issues are sorted by creation date, so scroll down to June 2019 and you should be able to see it. |
Any update on this? I keep thinking I'd really like to have this in VS Code... |
I'm looking forward to this one! |
yes definitely want //MARKs! Super helpful. |
any info about this? It is really helpful especially in large files |
Is there any progress after 2 years? |
Not that I've seen. Super frustrating... I even tweeted saying I'd be happy doing the work on it if someone could point me in the right direction. https://twitter.com/andyjeffries/status/1399768200557088770 |
Just to try to get some visibility, the main people that seem to have worked on the minimap are @alexdima and @RMacfarlane. Maybe tagging them may get the right eyes on this issue. Again, I've never used Typescript but I'm happy jumping in to help if I can just get some pointers on how to do it? Architecture guides on the minimap or VS Code in general? Any ideas for how you'd implement it, if you had time, etc. |
Bummer this has gone stale, would be a great feature |
Still nothing on this? Would love to see it |
Coming from Xcode back to this and seeing that it still not up made my day a very sad one. |
It would be game changing to have rendered headings for Currently using the Colored Regions plugin as a workaround, but would be amazing to finally see support for this added. |
Adding to this thread in hopes someone gets around to it. At this point, I'm almost bitter that there's anything in Xcode that I prefer over VSCode |
Me too, particularly bitter when I've already offered to help in doing it. I'll learn enough TypeScript to get it done. I just need a pointer in where in the codebase to start looking for it... |
I'm not a vscode developer but I have done some work to try to get this running. I don't have dedicated time to give to this so progress is slow and may fail entirely. In any case I can help point to where in the code to look. The first main task seems to be detecting what should be displayed as a "section header" (which is what I'm calling the things that should be visible text in the minimap). I wrote some yet-untested code that uses vscode's built-in region regexes to detect region starts. I'm getting these regexes via The next main task seems to be rendering the section headers in the minimap as readable text. The minimap is coded to expect lines that are all the same height, which was quite reasonable until this change, and to render those lines using cached bitmapped font characters. These get rendered to an ImageData and when the view changes only the necessary bits get re-rendered. This means that it's not super straightforward to add section headers since it's content with a different height and a different rendering method. In any case the starting point for all this rendering code is in minimap.ts. There are also some new configuration options that will likely be needed, and they live in more than one place. Search the codebase for Since someone will probably ask, I've pushed my changes to a branch. I'm well aware that my code is incorrect in some places (particularly my rendering code) and it currently doesn't even compile, so trying to run it will only end in tears. |
I made a PR but I guess I neglected to mention it in this issue. The minimap looks like the following with my PR: |
This looks absolutely epic @dgileadi !!! I assume it works with every language? (that reports comments as a syntax type) |
I don't know where comments should go, here or on the PR. I'll comment on the PR side though. Not working with one highlighting language. |
* WIP for adding minimap section headers for #74843 * Get section headers rendering * Fix default value of section header font size * Fix tests * Improve section header position * Fix separator display, update after config change * Split too-long headers with an ellipsis * Render section headers on the decorations canvas * Support MARK with just a separator line * Calculate minimap section headers asynchronously * Simplify change * Avoid font variable duplication * Fix issue introduced earlier * Recompute section headers when the language configuration changes * Fix problem in constructing region header range * Parse mark headers in the entire file and then filter out the ones not appearing in comments on the UI side, where tokens info is available --------- Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
Wanted to publicly thank @dgileadi for this work!!! Been a strong advocate of it for ages, and I'm so grateful for his efforts in the original PR, the reworked version and then keeping it up to date while waiting for it to be merged. Thank you! |
* WIP for adding minimap section headers for microsoft#74843 * Get section headers rendering * Fix default value of section header font size * Fix tests * Improve section header position * Fix separator display, update after config change * Split too-long headers with an ellipsis * Render section headers on the decorations canvas * Support MARK with just a separator line * Calculate minimap section headers asynchronously * Simplify change * Avoid font variable duplication * Fix issue introduced earlier * Recompute section headers when the language configuration changes * Fix problem in constructing region header range * Parse mark headers in the entire file and then filter out the ones not appearing in comments on the UI side, where tokens info is available --------- Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
Thank you @dgileadi ! |
You're most welcome—thank you for helping it get all the way there! |
Just stumbled upon this feature yesterday and really love it! Thanks @dgileadi! |
Thank you @dgileadi! |
One more thing.. what about also showing |
I think it would be awesome if there were an extension point for contributing "section header" items to the sidebar, but I didn't want to push this to be too complicated—it was already a lot of work to get this change in. |
Take a look at the minimap of Xcode 11.
// MARK: UISceneSession Lifecycle
in this case, but it can be used in a bunch more languagesThe text was updated successfully, but these errors were encountered: