Skip to content

Commit 9cf163c

Browse files
committed
Merge branch 'master' of https://github.com/LuaLS/lua-language-server into HEAD
2 parents 1d09f3b + d7e5982 commit 9cf163c

File tree

5 files changed

+8
-14
lines changed

5 files changed

+8
-14
lines changed

3rd/bee.lua

Submodule bee.lua updated 74 files

meta/template/coroutine.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function coroutine.create(f) end
1717
---@nodiscard
1818
function coroutine.isyieldable(co) end
1919
---#else
20+
---@version >5.2
2021
---#DES 'coroutine.isyieldable'
2122
---@return boolean
2223
---@nodiscard

script/provider/provider.lua

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,13 @@ m.register 'textDocument/didClose' {
292292
m.register 'textDocument/didChange' {
293293
---@async
294294
function (params)
295-
local doc = params.textDocument
295+
local doc = params.textDocument
296296
local changes = params.contentChanges
297297
local uri = files.getRealUri(doc.uri)
298-
workspace.awaitReady(uri)
299-
local text = files.getOriginText(uri)
298+
local text = files.getOriginText(uri)
300299
if not text then
301-
files.setText(uri, pub.awaitTask('loadFile', furi.decode(uri)), false)
300+
text = util.loadFile(furi.decode(uri))
301+
files.setText(uri, text, false)
302302
return
303303
end
304304
local rows = files.getCachedRows(uri)
@@ -1226,7 +1226,6 @@ m.register 'textDocument/formatting' {
12261226
capability = {
12271227
documentFormattingProvider = true,
12281228
},
1229-
abortByFileUpdate = true,
12301229
---@async
12311230
function(params)
12321231
local uri = files.getRealUri(params.textDocument.uri)
@@ -1257,8 +1256,6 @@ m.register 'textDocument/formatting' {
12571256
}
12581257
end
12591258

1260-
await.sleep(0.1)
1261-
12621259
return results
12631260
end
12641261
}
@@ -1267,7 +1264,6 @@ m.register 'textDocument/rangeFormatting' {
12671264
capability = {
12681265
documentRangeFormattingProvider = true,
12691266
},
1270-
abortByFileUpdate = true,
12711267
---@async
12721268
function(params)
12731269
local uri = files.getRealUri(params.textDocument.uri)
@@ -1298,8 +1294,6 @@ m.register 'textDocument/rangeFormatting' {
12981294
}
12991295
end
13001296

1301-
await.sleep(0.1)
1302-
13031297
return results
13041298
end
13051299
}
@@ -1339,7 +1333,6 @@ m.register 'textDocument/onTypeFormatting' {
13391333
newText = edit.text:gsub('\t', tab),
13401334
}
13411335
end
1342-
await.sleep(0.1)
13431336
return results
13441337
end
13451338
}

0 commit comments

Comments
 (0)