File tree Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,13 @@ const Query = (props: Props) => {
114
114
}
115
115
}
116
116
117
- const onKeyDownMonaco = ( e :monacoEditor . IKeyboardEvent ) => {
117
+ const onKeyDownMonaco = ( e : monacoEditor . IKeyboardEvent ) => {
118
+ // trigger parameter hints
118
119
if (
119
120
e . keyCode === monaco . KeyCode . Tab
120
- || e . keyCode === monaco . KeyCode . Space
121
121
|| e . keyCode === monaco . KeyCode . Enter
122
+ || ( e . keyCode === monaco . KeyCode . Space && e . ctrlKey && e . shiftKey )
123
+ || ( e . keyCode === monaco . KeyCode . Space && ! e . ctrlKey && ! e . shiftKey )
122
124
) {
123
125
onTriggerParameterHints ( )
124
126
}
Original file line number Diff line number Diff line change 1
1
import * as monacoEditor from 'monaco-editor/esm/vs/editor/editor.api'
2
2
3
3
export const redisLanguageConfig : monacoEditor . languages . LanguageConfiguration = {
4
+ wordPattern : / ( # ? - ? \d * \. \d \w * % ? ) | ( [ @ # ! . : ] ? [ \w - ? ] + % ? ) | [ @ # ! . ] / g,
4
5
comments : {
5
6
lineComment : '//' ,
6
7
// blockComment: ['/*', '*/'],
Original file line number Diff line number Diff line change 26
26
}
27
27
}
28
28
29
+ .monaco-editor .accessibilityHelpWidget {
30
+ overflow : auto ;
31
+ }
32
+
29
33
.monaco-glyph-run-command {
30
34
color : var (--rsSubmitBtn );
31
35
opacity : .5 !important ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ export const getRedisMonarchTokensProvider = (commands: string[]): monacoEditor.
31
31
{ include : '@numbers' } ,
32
32
{ include : '@strings' } ,
33
33
{ include : '@scopes' } ,
34
+ { include : '@keyword' } ,
34
35
[ / [ ; , . ] / , 'delimiter' ] ,
35
36
[ / [ ( ) ] / , '@brackets' ] ,
36
37
[
@@ -47,6 +48,13 @@ export const getRedisMonarchTokensProvider = (commands: string[]): monacoEditor.
47
48
] ,
48
49
[ / [ < > = ! % & + \- * / | ~ ^ ] / , 'operator' ] ,
49
50
] ,
51
+ keyword : [
52
+ [
53
+ `(${ commands . join ( '|' ) } )\\b` ,
54
+ // '(important|true)\\b',
55
+ 'keyword'
56
+ ]
57
+ ] ,
50
58
whitespace : [
51
59
[ / \s + / , 'white' ] ,
52
60
[ / \/ \/ .* $ / , 'comment' ] ,
You can’t perform that action at this time.
0 commit comments