Skip to content

Commit 0f46393

Browse files
authored
Merge pull request godotengine#8371 from Calinou/gdscript-basics-comment-keywords
Document comment keywords being highlighted in the script editor
2 parents d1506e0 + 0756294 commit 0f46393

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tutorials/scripting/gdscript/gdscript_basics.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,30 @@ considered a comment.
539539

540540
# This is a comment.
541541

542+
.. tip::
543+
544+
In the Godot script editor, special keywords are highlighted within comments
545+
to bring the user's attention to specific comments:
546+
547+
- **Critical** *(appears in red)*: ``ALERT``, ``ATTENTION``, ``DANGER``, ``HACK``,
548+
``SECURITY``
549+
- **Warning** *(appears in yellow)*: ``BUG``, ``CAUTION``, ``DEPRECATED``, ``FIXME``,
550+
``TASK``, ``TBD``, ``TODO``, ``WARNING``
551+
- **Notice** *(appears in green)*: ``NOTE``, ``NOTICE``, ``TEST``, ``TESTING``
552+
553+
These keywords are case-sensitive, so they must be written in uppercase for them
554+
to be recognized:
555+
556+
::
557+
558+
# In the example below, "TODO" will appear in yellow by default.
559+
# The `:` symbol after the keyword is not required, but it's often used.
560+
561+
# TODO: Add more items for the player to choose from.
562+
563+
The list of highlighted keywords and their colors can be changed in the **Text
564+
Editor > Theme > Comment Markers** section of the Editor Settings.
565+
542566
.. _doc_gdscript_builtin_types:
543567

544568
Line continuation

0 commit comments

Comments
 (0)