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

Minimap and Syntaxes - A means of distinguishing between code folding and region markers/headers #213275

Closed
sancarn opened this issue May 23, 2024 · 7 comments
Labels
editor-minimap Code/Text minimap widget issues feature-request Request for new features or functionality

Comments

@sancarn
Copy link

sancarn commented May 23, 2024

#190759 added headers wherever there is a region. Correct me if I'm wrong, but regions are also the only way to define code-folding.

As a result some language extensions which have enabled regions on loops (for collapsability) now have minimap markers, making the map look quite cluttered:

image

Might be worth being able to distinguish in syntax between regions for folding, and markers for minimap.

@alexdima alexdima added feature-request Request for new features or functionality editor-minimap Code/Text minimap widget issues labels Jun 3, 2024
@VSCodeTriageBot VSCodeTriageBot added this to the Backlog Candidates milestone Jun 3, 2024
@VSCodeTriageBot
Copy link
Collaborator

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@spartanatreyu
Copy link

Aren't regions supposed to be manually defined by the programmer and not by an extension?

@sancarn
Copy link
Author

sancarn commented Jun 5, 2024

That may well have been the intention but currently the following:

    "folding": {
        "markers": {
            "start": "^\\s*(Private|Protected|Friend|Public|Sub|Function|If|While|Do|For|Loop)\\b",
            "end": "^\\s*(End|Next|Wend)\\b"
        }
    },

is adding to the minimap, where I imagine it really shouldn't be...

@alexdima alexdima removed their assignment Jun 5, 2024
@ian-h-chamberlain
Copy link

I think related to this are #219561 and #209904 — since the section headers are defined by the language configuration, perhaps customizing the tags would be sufficient to workaround this, if the editor.minimap.sectionHeaderDetectionRegExp regex didn't match?

Even if that feature is accepted, it does seem like there should be a way to control the different header types:

  • MARK: (now: hardcoded, possible future: sectionHeaderDetectionRegExp matches)
  • folding.markers in language-configuration.json. This seems to affect some languages more than others, maybe due to some other regex matching?

Copy link

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@sancarn
Copy link
Author

sancarn commented Jul 24, 2024

I think related to this are #219561 and #209904 — since the section headers are defined by the language configuration, perhaps customizing the tags would be sufficient to workaround this, if the editor.minimap.sectionHeaderDetectionRegExp regex didn't match?

Even if that feature is accepted, it does seem like there should be a way to control the different header types:

  • MARK: (now: hardcoded, possible future: sectionHeaderDetectionRegExp matches)
  • folding.markers in language-configuration.json. This seems to affect some languages more than others, maybe due to some other regex matching?

Yeah I think you're right, thanks for the headsup :)

Copy link

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-minimap Code/Text minimap widget issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants