diff --git a/subprojects/frontend/src/editor/EditorButtons.tsx b/subprojects/frontend/src/editor/EditorButtons.tsx
index 15f0f635..690e6a8d 100644
--- a/subprojects/frontend/src/editor/EditorButtons.tsx
+++ b/subprojects/frontend/src/editor/EditorButtons.tsx
@@ -16,6 +16,7 @@ import RedoIcon from '@mui/icons-material/Redo';
import SaveIcon from '@mui/icons-material/Save';
import SaveAsIcon from '@mui/icons-material/SaveAs';
import SearchIcon from '@mui/icons-material/Search';
+import ShortcutIcon from '@mui/icons-material/ShortcutOutlined';
import UndoIcon from '@mui/icons-material/Undo';
import WarningIcon from '@mui/icons-material/Warning';
import IconButton from '@mui/material/IconButton';
@@ -150,6 +151,15 @@ export default observer(function EditorButtons({
+
+ editorStore?.goToDefinition()}
+ color="inherit"
+ >
+
+
+
store.goToDefinition(),
+ },
// Enable accepting completions with tab, overrides `Tab` from
// `indentWithTab` if there is an active completion.
{ key: 'Tab', run: acceptCompletion },
diff --git a/subprojects/frontend/src/xtext/OccurrencesService.ts b/subprojects/frontend/src/xtext/OccurrencesService.ts
index 03858605..ce6d4fcf 100644
--- a/subprojects/frontend/src/xtext/OccurrencesService.ts
+++ b/subprojects/frontend/src/xtext/OccurrencesService.ts
@@ -144,7 +144,7 @@ export default class OccurrencesService {
this.store.updateOccurrences(write, read, goToFirst, pos);
}
- goToDefinition(pos: number): Promise {
+ goToDefinition(pos?: number): Promise {
return this.updateOccurrences(pos, true);
}
}
diff --git a/subprojects/frontend/src/xtext/XtextClient.ts b/subprojects/frontend/src/xtext/XtextClient.ts
index 26fe1cc2..1dd87e0c 100644
--- a/subprojects/frontend/src/xtext/XtextClient.ts
+++ b/subprojects/frontend/src/xtext/XtextClient.ts
@@ -165,7 +165,7 @@ export default class XtextClient {
return this.hoverService.hoverTooltip(pos);
}
- goToDefinition(pos: number): void {
+ goToDefinition(pos?: number): void {
this.occurrencesService.goToDefinition(pos).catch((e) => {
log.error('Error while fetching occurrences', e);
});