-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Editor: Document comment marker editor settings #96566
base: master
Are you sure you want to change the base?
Editor: Document comment marker editor settings #96566
Conversation
<member name="text_editor/theme/highlighting/comment_markers/critical_color" type="Color" setter="" getter=""> | ||
The script editor's critical comment marker color. | ||
</member> | ||
<member name="text_editor/theme/highlighting/comment_markers/critical_list" type="String" setter="" getter=""> | ||
Comma-separated list of critical comment markers. Each marker must be a valid Unicode identifier. | ||
</member> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would appreciate assistance in writing better descriptions.
Does a codeblock's syntax highlighting take these colors into account in the built-in class reference? If yes, we could use them as basic examples. As a general clue, it's most unlikely users are going to remove "NOTE", "FIXME", and "HACK". |
Yes, comment markers are taken into account when highlighting code in the built-in doc viewer. The same editor settings are used as in the script editor. But as you said, we can assume that users do not delete the default comment markers in most cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this but what I've done for myself is shifting these markers around to distinguish between FIXME, HACK, and TODO better.
The script editor's critical comment marker color. | ||
</member> | ||
<member name="text_editor/theme/highlighting/comment_markers/critical_list" type="String" setter="" getter=""> | ||
Comma-separated list of critical comment markers. Each marker must be a valid Unicode identifier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comma-separated list of critical comment markers. Each marker must be a valid Unicode identifier. | |
Comma-separated list of terms highlighted inside comments to denote critical messages. Each marker must be a valid Unicode identifier. | |
[codeblock] | |
# CAUTION: A single change, and everything goes kaboom. | |
# CRITICAL: Pretty much broken on Linux. | |
# How can this code be so bad, it poses an actual DANGER? | |
[/codeblock] |
@@ -1197,6 +1197,24 @@ | |||
The script editor's comment color. | |||
[b]Note:[/b] In GDScript, unlike Python, multiline strings are not considered to be comments, and will use the string highlighting color instead. | |||
</member> | |||
<member name="text_editor/theme/highlighting/comment_markers/critical_color" type="Color" setter="" getter=""> | |||
The script editor's critical comment marker color. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change this, but it's consistent with the surrounding descriptions, and consistency is better.
The script editor's notice comment marker color. | ||
</member> | ||
<member name="text_editor/theme/highlighting/comment_markers/notice_list" type="String" setter="" getter=""> | ||
Comma-separated list of notice comment markers. Each marker must be a valid Unicode identifier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comma-separated list of notice comment markers. Each marker must be a valid Unicode identifier. | |
Comma-separated list of terms used in comments to denote noteworthy messages. Each marker must be a valid Unicode identifier. | |
[codeblock] | |
# NOTE: Despite the name, this function always returns a Node. | |
# INFO: This does not work with vectors. | |
[/codeblock] |
The script editor's warning comment marker color. | ||
</member> | ||
<member name="text_editor/theme/highlighting/comment_markers/warning_list" type="String" setter="" getter=""> | ||
Comma-separated list of warning comment markers. Each marker must be a valid Unicode identifier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comma-separated list of warning comment markers. Each marker must be a valid Unicode identifier. | |
Comma-separated list of terms used in comments to denote warning messages. Each marker must be a valid Unicode identifier. | |
[codeblock] | |
# FIXME: Remove the comment below. | |
# TODO: Explain the comment above. | |
# HACK: I can't be bothered cleaning this up. | |
[/codeblock] |
The
text_editor/theme/highlighting/comment_markers/*
editor settings are intended to be language independent, but are currently only used in GDScript. Moving the initialization toeditor/editor_settings.cpp
allows the documentation system to find these settings.