summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-10-17 20:20:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-10-17 20:20:18 +0800
commit4e647a342a525eda45418398f1409c8e5a57adff (patch)
tree5d0ccd3849e2f545b02c5c6f50c4be2d539cb36e /script/provider/provider.lua
parent279c1ad7b88e464535971143660712fb0ea259ca (diff)
downloadlua-language-server-4e647a342a525eda45418398f1409c8e5a57adff.zip
new setting `Lua.diagnostics.workspaceEvent`
set the time to trigger workspace diagnostics. resolve #1626
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 2225588a..7386ded0 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -312,6 +312,22 @@ m.register 'textDocument/didChange' {
end
}
+m.register 'textDocument/didSave' {
+ capability = {
+ textDocumentSync = {
+ save = {
+ includeText = false,
+ },
+ }
+ },
+ ---@async
+ function (params)
+ local doc = params.textDocument
+ local uri = files.getRealUri(doc.uri)
+ files.onWatch('save', uri)
+ end
+}
+
m.register 'textDocument/hover' {
capability = {
hoverProvider = true,