summaryrefslogtreecommitdiffstats
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-10-09 23:21:54 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-10-09 23:21:54 +0200
commit71a8ac41fbea5bb97c25d66e17c06e8dfff4ebf1 (patch)
tree8cff3a7f5b0251620f3fe16804d0a7f8138452cf /editor/code_editor.cpp
parent42425baa59956dc9d1e22341fe5e5d7f8fad5067 (diff)
parentde7cbe87894cc9eaea1f3057fff7fe98f66aad25 (diff)
downloadredot-engine-71a8ac41fbea5bb97c25d66e17c06e8dfff4ebf1.tar.gz
Merge pull request #72751 from dalexeev/doc-comment-color
Highlight doc comments in a different color
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 64467bc254..cd6f672b4b 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -951,6 +951,8 @@ void CodeTextEditor::_complete_request() {
font_color = get_theme_color(e.theme_color_name, SNAME("Editor"));
} else if (e.insert_text.begins_with("\"") || e.insert_text.begins_with("\'")) {
font_color = completion_string_color;
+ } else if (e.insert_text.begins_with("##") || e.insert_text.begins_with("///")) {
+ font_color = completion_doc_comment_color;
} else if (e.insert_text.begins_with("#") || e.insert_text.begins_with("//")) {
font_color = completion_comment_color;
}
@@ -1026,6 +1028,7 @@ void CodeTextEditor::update_editor_settings() {
completion_font_color = EDITOR_GET("text_editor/theme/highlighting/completion_font_color");
completion_string_color = EDITOR_GET("text_editor/theme/highlighting/string_color");
completion_comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
+ completion_doc_comment_color = EDITOR_GET("text_editor/theme/highlighting/doc_comment_color");
// Appearance: Caret
text_editor->set_caret_type((TextEdit::CaretType)EDITOR_GET("text_editor/appearance/caret/type").operator int());