@@ -19,21 +19,21 @@ export default function (options: {
19
19
triggerCharacters : [ '"' , ':' ] ,
20
20
21
21
on ( document , position , context ) {
22
- return worker ( document , ( jsonDocument ) => {
23
- return jsonLs . doComplete ( document , position , jsonDocument ) ;
22
+ return worker ( document , async ( jsonDocument ) => {
23
+ return await jsonLs . doComplete ( document , position , jsonDocument ) ;
24
24
} ) ;
25
25
} ,
26
26
27
- resolve ( item ) {
28
- return jsonLs . doResolve ( item ) ;
27
+ async resolve ( item ) {
28
+ return await jsonLs . doResolve ( item ) ;
29
29
} ,
30
30
} ,
31
31
32
32
definition : {
33
33
34
34
on ( document , position ) {
35
- return worker ( document , ( jsonDocument ) => {
36
- return jsonLs . findDefinition ( document , position , jsonDocument ) ;
35
+ return worker ( document , async ( jsonDocument ) => {
36
+ return await jsonLs . findDefinition ( document , position , jsonDocument ) ;
37
37
} ) ;
38
38
} ,
39
39
} ,
@@ -43,55 +43,55 @@ export default function (options: {
43
43
44
44
const documentLanguageSettings = undefined ; // await getSettings(); // TODO
45
45
46
- return jsonLs . doValidation ( document , jsonDocument , documentLanguageSettings , options . schema ) as Promise < vscode . Diagnostic [ ] > ;
46
+ return await jsonLs . doValidation ( document , jsonDocument , documentLanguageSettings , options . schema ) as vscode . Diagnostic [ ] ;
47
47
} ) ;
48
48
} ,
49
49
50
50
doHover ( document , position ) {
51
- return worker ( document , ( jsonDocument ) => {
52
- return jsonLs . doHover ( document , position , jsonDocument ) ;
51
+ return worker ( document , async ( jsonDocument ) => {
52
+ return await jsonLs . doHover ( document , position , jsonDocument ) ;
53
53
} ) ;
54
54
} ,
55
55
56
56
findDocumentLinks ( document ) {
57
- return worker ( document , ( jsonDocument ) => {
58
- return jsonLs . findLinks ( document , jsonDocument ) ;
57
+ return worker ( document , async ( jsonDocument ) => {
58
+ return await jsonLs . findLinks ( document , jsonDocument ) ;
59
59
} ) ;
60
60
} ,
61
61
62
62
findDocumentSymbols ( document ) {
63
- return worker ( document , ( jsonDocument ) => {
64
- return jsonLs . findDocumentSymbols ( document , jsonDocument ) ;
63
+ return worker ( document , async ( jsonDocument ) => {
64
+ return await jsonLs . findDocumentSymbols ( document , jsonDocument ) ;
65
65
} ) ;
66
66
} ,
67
67
68
68
findDocumentColors ( document ) {
69
- return worker ( document , ( jsonDocument ) => {
70
- return jsonLs . findDocumentColors ( document , jsonDocument ) ;
69
+ return worker ( document , async ( jsonDocument ) => {
70
+ return await jsonLs . findDocumentColors ( document , jsonDocument ) ;
71
71
} ) ;
72
72
} ,
73
73
74
74
getColorPresentations ( document , color , range ) {
75
- return worker ( document , ( jsonDocument ) => {
76
- return jsonLs . getColorPresentations ( document , jsonDocument , color , range ) ;
75
+ return worker ( document , async ( jsonDocument ) => {
76
+ return await jsonLs . getColorPresentations ( document , jsonDocument , color , range ) ;
77
77
} ) ;
78
78
} ,
79
79
80
80
getFoldingRanges ( document ) {
81
- return worker ( document , ( jsonDocument ) => {
82
- return jsonLs . getFoldingRanges ( document ) ;
81
+ return worker ( document , async ( jsonDocument ) => {
82
+ return await jsonLs . getFoldingRanges ( document ) ;
83
83
} ) ;
84
84
} ,
85
85
86
86
getSelectionRanges ( document , positions ) {
87
- return worker ( document , ( jsonDocument ) => {
88
- return jsonLs . getSelectionRanges ( document , positions , jsonDocument ) ;
87
+ return worker ( document , async ( jsonDocument ) => {
88
+ return await jsonLs . getSelectionRanges ( document , positions , jsonDocument ) ;
89
89
} ) ;
90
90
} ,
91
91
92
92
format ( document , range , options ) {
93
- return worker ( document , ( jsonDocument ) => {
94
- return jsonLs . format ( document , range , options ) ;
93
+ return worker ( document , async ( jsonDocument ) => {
94
+ return await jsonLs . format ( document , range , options ) ;
95
95
} ) ;
96
96
} ,
97
97
} ;
0 commit comments