From 955588eb3e7377094ee85dbb3aeeafa3908d09e3 Mon Sep 17 00:00:00 2001 From: Niraj Nandish Date: Tue, 18 May 2021 00:42:22 +0400 Subject: [PATCH] fix(editor): Remove keybind of intellisense (#42137) * fix: Remove keybind of intellisense * fix: remove old solution * fix: disable suggestion on trigger characters --- client/src/templates/Challenges/classic/Editor.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/client/src/templates/Challenges/classic/Editor.js b/client/src/templates/Challenges/classic/Editor.js index c24f29f852..a89be4b7ec 100644 --- a/client/src/templates/Challenges/classic/Editor.js +++ b/client/src/templates/Challenges/classic/Editor.js @@ -189,7 +189,8 @@ class Editor extends Component { lightbulb: { enabled: false }, - quickSuggestions: false + quickSuggestions: false, + suggestOnTriggerCharacters: false }; this._editor = null; @@ -253,6 +254,12 @@ class Editor extends Component { // TODO: only one Editor should be calling for focus at once. editor.focus(); } else this.focusOnHotkeys(); + // Removes keybind for intellisense + editor._standaloneKeybindingService.addDynamicKeybinding( + '-editor.action.triggerSuggest', + null, + () => {} + ); editor.addAction({ id: 'execute-challenge', label: 'Run tests', @@ -293,11 +300,6 @@ class Editor extends Component { }); } }); - // Overrides Intellisense suggestion box - editor.addCommand( - monaco.KeyMod.CtrlCmd | monaco.KeyCode.Space, - function () {} - ); editor.onDidFocusEditorWidget(() => this.props.setEditorFocusability(true)); // This is to persist changes caused by the accessibility tooltip. editor.onDidChangeConfiguration(event => {