summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument/didChange.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-11-20 18:40:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-11-20 18:40:33 +0800
commit67f6a20b27c98788843883c3712c648e110d781f (patch)
tree209705e0bc3c2c44d5ffade78cc2c7041eeffdda /server/src/method/textDocument/didChange.lua
parenta65a1ddb13854c2dfde4c04630a0a942abdafa32 (diff)
downloadlua-language-server-67f6a20b27c98788843883c3712c648e110d781f.zip
转移目录
Diffstat (limited to 'server/src/method/textDocument/didChange.lua')
-rw-r--r--server/src/method/textDocument/didChange.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/method/textDocument/didChange.lua b/server/src/method/textDocument/didChange.lua
new file mode 100644
index 00000000..6856b729
--- /dev/null
+++ b/server/src/method/textDocument/didChange.lua
@@ -0,0 +1,7 @@
+return function (lsp, params)
+ local doc = params.textDocument
+ local change = params.contentChanges
+ -- TODO 支持差量更新
+ lsp:saveText(doc.uri, doc.version, change[1].text)
+ return true
+end