@@ -6,15 +6,14 @@ import {
6
6
registerFileSystemOverlay ,
7
7
} from "vscode/service-override/files" ;
8
8
9
- import { APP_STATUS , COLOR_MODE , Pages , RUNTIMES_PATH } from "@/constants" ;
9
+ import { APP_STATUS , COLOR_MODE , RUNTIMES_PATH } from "@/constants" ;
10
10
11
11
import "./useWorker" ;
12
12
13
13
import { createUrl , createWebSocketAndStartClient , performInit } from "./LanguageClient" ;
14
14
15
15
import { TFunction } from "@/apis/typing" ;
16
16
import useFunctionCache from "@/hooks/useFunctionCache" ;
17
- import useHotKey , { DEFAULT_SHORTCUTS } from "@/hooks/useHotKey" ;
18
17
import useFunctionStore from "@/pages/app/functions/store" ;
19
18
import useGlobalStore from "@/pages/globalStore" ;
20
19
@@ -54,16 +53,6 @@ function FunctionEditor(props: {
54
53
}
55
54
} , [ baseUrl ] ) ;
56
55
57
- useHotKey (
58
- DEFAULT_SHORTCUTS . send_request ,
59
- ( ) => {
60
- editorRef . current ?. trigger ( "keyboard" , "editor.action.formatDocument" , { } ) ;
61
- } ,
62
- {
63
- enabled : globalStore . currentPageId === Pages . function ,
64
- } ,
65
- ) ;
66
-
67
56
useEffect ( ( ) => {
68
57
const startLSP = ( ) => {
69
58
const lspWebSocket = createWebSocketAndStartClient ( url , globalStore . currentApp . develop_token ) ;
@@ -159,6 +148,10 @@ function FunctionEditor(props: {
159
148
scrollBeyondLastLine : false ,
160
149
value : value ,
161
150
} ) ;
151
+ monaco . editor . addKeybindingRule ( {
152
+ keybinding : monaco . KeyMod . CtrlCmd | monaco . KeyCode . KeyP ,
153
+ command : null ,
154
+ } )
162
155
} ) ;
163
156
}
164
157
0 commit comments