File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1226,6 +1226,7 @@ m.register 'textDocument/formatting' {
1226
1226
capability = {
1227
1227
documentFormattingProvider = true ,
1228
1228
},
1229
+ abortByFileUpdate = true ,
1229
1230
--- @async
1230
1231
function (params )
1231
1232
local uri = files .getRealUri (params .textDocument .uri )
@@ -1256,6 +1257,8 @@ m.register 'textDocument/formatting' {
1256
1257
}
1257
1258
end
1258
1259
1260
+ await .sleep (0.1 )
1261
+
1259
1262
return results
1260
1263
end
1261
1264
}
@@ -1264,6 +1267,7 @@ m.register 'textDocument/rangeFormatting' {
1264
1267
capability = {
1265
1268
documentRangeFormattingProvider = true ,
1266
1269
},
1270
+ abortByFileUpdate = true ,
1267
1271
--- @async
1268
1272
function (params )
1269
1273
local uri = files .getRealUri (params .textDocument .uri )
@@ -1294,6 +1298,8 @@ m.register 'textDocument/rangeFormatting' {
1294
1298
}
1295
1299
end
1296
1300
1301
+ await .sleep (0.1 )
1302
+
1297
1303
return results
1298
1304
end
1299
1305
}
@@ -1333,6 +1339,7 @@ m.register 'textDocument/onTypeFormatting' {
1333
1339
newText = edit .text :gsub (' \t ' , tab ),
1334
1340
}
1335
1341
end
1342
+ await .sleep (0.1 )
1336
1343
return results
1337
1344
end
1338
1345
}
You can’t perform that action at this time.
0 commit comments