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

Add region markers folding for Go #69899

Merged
merged 2 commits into from May 27, 2019
Merged

Conversation

c0m3tx
Copy link
Contributor

@c0m3tx c0m3tx commented Mar 6, 2019

Add region markers for folding Go code

// Region regionName

// EndRegion

@aeschli
Copy link
Contributor

aeschli commented Mar 29, 2019

Is // Region already commonly used in Go? We typically use // #region

@aeschli aeschli added this to the April 2019 milestone Mar 29, 2019
@c0m3tx
Copy link
Contributor Author

c0m3tx commented Mar 30, 2019

@aeschli I tried to stay close to common Go syntax. # symbol is not used in the language AFAIK, but capitalized words are.

@aeschli
Copy link
Contributor

aeschli commented Apr 1, 2019

Also not inside a comment? the # avoids that comments starting with the word 'Region' trigger a (incomplete) folding range
@ramya-rao-a Can you advise?

@c0m3tx
Copy link
Contributor Author

c0m3tx commented Apr 1, 2019

Also not inside a comment?

@aeschli what do you mean?

I think that adding a foreign character in Go code may look strange, but if you think it would be better it's fine for me ofc 👍

@aeschli
Copy link
Contributor

aeschli commented Apr 1, 2019

I'm just trying to understand, I'm a 'Go' novice. In the languages I know, comments can contain any character or symbol (maybe except for the comment end token). @ramya-rao-a is our Go expert. Let's wait for her input.

@c0m3tx
Copy link
Contributor Author

c0m3tx commented Apr 1, 2019

Ah ok I see! No, there is no issue with # characters in comments, they are totally fine.

@aeschli aeschli modified the milestones: April 2019, May 2019 May 6, 2019
@aeschli
Copy link
Contributor

aeschli commented May 27, 2019

To be consistent with the other range markers, I updated the markers to // region, // endregion and // #region, // #endregion

@aeschli aeschli merged commit 235262c into microsoft:master May 27, 2019
@aeschli aeschli added feature-request Request for new features or functionality verification-needed Verification of issue is requested labels May 27, 2019
@c0m3tx
Copy link
Contributor Author

c0m3tx commented May 27, 2019

Thank you @aeschli !

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants