summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCppCXY <812125110@qq.com>2023-04-27 16:22:23 +0800
committerCppCXY <812125110@qq.com>2023-04-27 16:22:23 +0800
commit9cf163c222f0daef70a692ebf8ba3c9f5fb86bef (patch)
tree316110c2dd87bac4fecdf6f258d409fb0578ecef
parent1d09f3bd87645e930bf93c14e5790b9297c49075 (diff)
parentd7e59826b5dec2d6f4b9ba59f6d64af42c078edd (diff)
downloadlua-language-server-9cf163c222f0daef70a692ebf8ba3c9f5fb86bef.zip
Merge branch 'master' of https://github.com/LuaLS/lua-language-server into HEAD
m---------3rd/bee.lua0
m---------3rd/json.lua0
m---------3rd/lovr-api0
-rw-r--r--meta/template/coroutine.lua1
-rw-r--r--script/provider/provider.lua15
5 files changed, 5 insertions, 11 deletions
diff --git a/3rd/bee.lua b/3rd/bee.lua
-Subproject ca581b9191d98a0644da1dc3332bb59274c9f10
+Subproject a131e39521e230ea2bbca20cb6b1c5abbc6a437
diff --git a/3rd/json.lua b/3rd/json.lua
-Subproject be1d71ff7afe84942eb3f33b76c8bf75306c463
+Subproject bd7b7787bb8b586e59b5afe5886dd1b76c86eb5
diff --git a/3rd/lovr-api b/3rd/lovr-api
-Subproject cd208aeb7dabf47d4edecdb9162c1d7d10e73a1
+Subproject 441a21a6eb32e611be889cadf41df16938eda43
diff --git a/meta/template/coroutine.lua b/meta/template/coroutine.lua
index b3890bfd..91a3aba3 100644
--- a/meta/template/coroutine.lua
+++ b/meta/template/coroutine.lua
@@ -17,6 +17,7 @@ function coroutine.create(f) end
---@nodiscard
function coroutine.isyieldable(co) end
---#else
+---@version >5.2
---#DES 'coroutine.isyieldable'
---@return boolean
---@nodiscard
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 048cf1e0..efa627c3 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -292,13 +292,13 @@ m.register 'textDocument/didClose' {
m.register 'textDocument/didChange' {
---@async
function (params)
- local doc = params.textDocument
+ local doc = params.textDocument
local changes = params.contentChanges
local uri = files.getRealUri(doc.uri)
- workspace.awaitReady(uri)
- local text = files.getOriginText(uri)
+ local text = files.getOriginText(uri)
if not text then
- files.setText(uri, pub.awaitTask('loadFile', furi.decode(uri)), false)
+ text = util.loadFile(furi.decode(uri))
+ files.setText(uri, text, false)
return
end
local rows = files.getCachedRows(uri)
@@ -1226,7 +1226,6 @@ m.register 'textDocument/formatting' {
capability = {
documentFormattingProvider = true,
},
- abortByFileUpdate = true,
---@async
function(params)
local uri = files.getRealUri(params.textDocument.uri)
@@ -1257,8 +1256,6 @@ m.register 'textDocument/formatting' {
}
end
- await.sleep(0.1)
-
return results
end
}
@@ -1267,7 +1264,6 @@ m.register 'textDocument/rangeFormatting' {
capability = {
documentRangeFormattingProvider = true,
},
- abortByFileUpdate = true,
---@async
function(params)
local uri = files.getRealUri(params.textDocument.uri)
@@ -1298,8 +1294,6 @@ m.register 'textDocument/rangeFormatting' {
}
end
- await.sleep(0.1)
-
return results
end
}
@@ -1339,7 +1333,6 @@ m.register 'textDocument/onTypeFormatting' {
newText = edit.text:gsub('\t', tab),
}
end
- await.sleep(0.1)
return results
end
}