Repository: godotengine/godot (language: cpp)

Issue:
 Lookup Symbol shortcut cannot be specified in the Editor shortcut settings
### Tested versions

Repro in 4.2

### System information

macOS Sonoma non-mono version

### Issue description

" Lookup Symbol" shortcut cannot be specified in the Editor shortcut settings, and I think it's probably just being overlooked. So I could use my preferred shortcut to look at the definition. It's supported in all major IDEs and I'm not the only one needing this in Godot: https://www.reddit.com/r/godot/comments/150ej30/shortcut_for_go_to_definitionlook_up_symbol/


### Steps to reproduce

Go to Editor > Editor Settings > shortcuts and search for Lookup Symbol and nothing shows

### Minimal reproduction project (MRP)

NA


Discussion / hints:
@tpcmurray Please don't bump issues without contributing significant new information. Use the :+1: reaction button on the first post instead.
This might close godotengine/godot-proposals#4577 (forgive if this was obvious -- I came considering fixing and thought it useful to cross link these two.)

p.s. thx for fixing already -- keenly awaiting this landing!

Fix patch:
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index ece9616b69b2..b7712c4a532d 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -2337,7 +2337,7 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p
 	if (p_color || p_open_docs || p_goto_definition) {
 		context_menu->add_separator();
 		if (p_open_docs) {
-			context_menu->add_item(TTR("Lookup Symbol"), LOOKUP_SYMBOL);
+			context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_symbol"), LOOKUP_SYMBOL);
 		}
 		if (p_color) {
 			context_menu->add_item(TTR("Pick Color"), EDIT_PICK_COLOR);
@@ -2491,6 +2491,7 @@ void ScriptTextEditor::_enable_code_editor() {
 	edit_hb->add_child(goto_menu);
 	goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_function"), SEARCH_LOCATE_FUNCTION);
 	goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
+	goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_symbol"), LOOKUP_SYMBOL);
 	goto_menu->get_popup()->add_separator();
 
 	goto_menu->get_popup()->add_submenu_node_item(TTR("Bookmarks"), bookmarks_menu);
@@ -2675,6 +2676,7 @@ void ScriptTextEditor::register_editor() {
 	ED_SHORTCUT_OVERRIDE("script_text_editor/goto_function", "macos", KeyModifierMask::CTRL | KeyModifierMask::META | Key::J);
 
 	ED_SHORTCUT("script_text_editor/goto_line", TTRC("Go to Line..."), KeyModifierMask::CMD_OR_CTRL | Key::L);
+	ED_SHORTCUT("script_text_editor/goto_symbol", TTRC("Lookup Symbol"));
 
 	ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTRC("Toggle Breakpoint"), Key::F9);
 	ED_SHORTCUT_OVERRIDE("script_text_editor/toggle_breakpoint", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::B);


Test patch: