From c0397f1f4c80e73a2e4ccd1946703fe6a5bb405e Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 3 Jan 2023 18:01:04 -0500 Subject: go to type definition --- command.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'command.c') diff --git a/command.c b/command.c index bf26b3a..9ba6766 100644 --- a/command.c +++ b/command.c @@ -67,6 +67,7 @@ static CommandName const command_names[] = { {"goto-definition", CMD_GOTO_DEFINITION}, {"goto-definition-at-cursor", CMD_GOTO_DEFINITION_AT_CURSOR}, {"goto-declaration-at-cursor", CMD_GOTO_DECLARATION_AT_CURSOR}, + {"goto-type-definition-at-cursor", CMD_GOTO_TYPE_DEFINITION_AT_CURSOR}, {"find", CMD_FIND}, {"find-replace", CMD_FIND_REPLACE}, {"tab-close", CMD_TAB_CLOSE}, @@ -417,6 +418,11 @@ void command_execute(Ted *ted, Command c, i64 argument) { buffer_goto_word_at_cursor(buffer, GOTO_DECLARATION); } } break; + case CMD_GOTO_TYPE_DEFINITION_AT_CURSOR: { + if (buffer && buffer_is_named_file(buffer)) { + buffer_goto_word_at_cursor(buffer, GOTO_TYPE_DEFINITION); + } + } break; case CMD_FIND_USAGES: usages_find(ted); break; -- cgit v1.2.3