mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-30 18:58:45 +08:00
Fix completion shortcuts (#792)
* Fix completion shortcuts * Remove shortcut override
This commit is contained in:
parent
6f53e3db6a
commit
b0563d14a6
3 changed files with 6 additions and 25 deletions
|
@ -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,
|
||||
|
|
2
assets/package-lock.json
generated
2
assets/package-lock.json
generated
|
@ -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": {
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue