mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Highlight doc comments in a different color
This commit is contained in:
parent
6916349697
commit
de7cbe8789
17 changed files with 86 additions and 6 deletions
|
@ -191,6 +191,16 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
|
|||
highlighter->add_color_region(beg, end, comment_color, end.is_empty());
|
||||
}
|
||||
|
||||
/* Doc comments */
|
||||
const Color doc_comment_color = EDITOR_GET("text_editor/theme/highlighting/doc_comment_color");
|
||||
List<String> doc_comments;
|
||||
scr->get_language()->get_doc_comment_delimiters(&doc_comments);
|
||||
for (const String &doc_comment : doc_comments) {
|
||||
String beg = doc_comment.get_slice(" ", 0);
|
||||
String end = doc_comment.get_slice_count(" ") > 1 ? doc_comment.get_slice(" ", 1) : String();
|
||||
highlighter->add_color_region(beg, end, doc_comment_color, end.is_empty());
|
||||
}
|
||||
|
||||
/* Strings */
|
||||
const Color string_color = EDITOR_GET("text_editor/theme/highlighting/string_color");
|
||||
List<String> strings;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue