summaryrefslogtreecommitdiffstats
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-03-24 01:11:42 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-03-24 01:11:42 +0100
commit0e966b39b410ac4ca2be7400b14f23d5859bdf57 (patch)
tree3fea0197457bbf4e1a8ac8e8c797060663d4aa71 /editor/code_editor.cpp
parentfe01776f05b1787b28b4a270d53037a3c25f4ca2 (diff)
parentde8b6f7a3c1254254fd1079ef9a0a4614cc0dfc3 (diff)
downloadredot-engine-0e966b39b410ac4ca2be7400b14f23d5859bdf57.tar.gz
Merge pull request #66481 from MewPurPur/auto-stringname-nodepath
Add editor settings for autocompletion with NodePath and StringName
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 6c16951186..0e369c91e1 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -941,6 +941,10 @@ void CodeTextEditor::_complete_request() {
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("&")) {
+ font_color = completion_string_name_color;
+ } else if (e.insert_text.begins_with("^")) {
+ font_color = completion_node_path_color;
} else if (e.insert_text.begins_with("#") || e.insert_text.begins_with("//")) {
font_color = completion_comment_color;
}
@@ -997,6 +1001,8 @@ void CodeTextEditor::update_editor_settings() {
// Theme: Highlighting
completion_font_color = EDITOR_GET("text_editor/theme/highlighting/completion_font_color");
completion_string_color = EDITOR_GET("text_editor/theme/highlighting/string_color");
+ completion_string_name_color = EDITOR_GET("text_editor/theme/highlighting/gdscript/string_name_color");
+ completion_node_path_color = EDITOR_GET("text_editor/theme/highlighting/gdscript/node_path_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");