Fix completion shortcuts (#792)

* Fix completion shortcuts

* Remove shortcut override
This commit is contained in:
Jonatan Kłosko 2021-12-12 00:10:15 +01:00 committed by GitHub
parent 6f53e3db6a
commit b0563d14a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 25 deletions

View file

@ -1,4 +1,4 @@
import monaco, { addKeybinding } from "./live_editor/monaco";
import monaco from "./live_editor/monaco";
import EditorClient from "./live_editor/editor_client";
import MonacoEditorAdapter from "./live_editor/monaco_editor_adapter";
import HookServerAdapter from "./live_editor/hook_server_adapter";
@ -201,18 +201,6 @@ class LiveEditor {
this.container.style.height = `${contentHeight}px`;
});
// Replace built-in keybindings
// Note that generally we want to stick to defaults, so that we match
// VS Code, but some keybindings are overly awkward, in which case we
// add our own
// By default this is a sequence of: Ctrl + K Ctrl + I
addKeybinding(
this.editor,
"editor.action.showHover",
monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_I
);
/* Overrides */
// Move the command palette widget to overflowing widgets container,

View file

@ -61,7 +61,7 @@
"version": "3.1.0"
},
"../deps/phoenix_live_view": {
"version": "0.17.4",
"version": "0.17.5",
"license": "MIT"
},
"node_modules/@babel/code-frame": {

View file

@ -17,13 +17,6 @@ defmodule LivebookWeb.SessionLive.ShortcutsComponent do
press_all: true,
desc: "Show signature help"
},
%{
seq: ["ctrl", "i"],
seq_mac: ["", "i"],
press_all: true,
desc: "Show identifier documentation",
basic: true
},
%{
seq: ["ctrl", "shift", "i"],
seq_mac: ["", "", "f"],
@ -45,14 +38,14 @@ defmodule LivebookWeb.SessionLive.ShortcutsComponent do
desc: "Delete lines"
},
%{
seq: ["ctrl", "["],
seq_mac: ["", "["],
seq: ["ctrl", "]"],
seq_mac: ["", "]"],
press_all: true,
desc: "Indent lines"
},
%{
seq: ["ctrl", "]"],
seq_mac: ["", "]"],
seq: ["ctrl", "["],
seq_mac: ["", "["],
press_all: true,
desc: "Outdent lines"
},