summaryrefslogtreecommitdiff
path: root/server/src/method/initialize.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/method/initialize.lua')
-rw-r--r--server/src/method/initialize.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/src/method/initialize.lua b/server/src/method/initialize.lua
new file mode 100644
index 00000000..866ded66
--- /dev/null
+++ b/server/src/method/initialize.lua
@@ -0,0 +1,18 @@
+return function (lsp, data)
+ lsp._inited = true
+ return {
+ capabilities = {
+ -- 支持“转到定义”
+ definitionProvider = true,
+ -- 支持“转到实现”
+ implementationProvider = true,
+ -- 文本同步方式
+ textDocumentSync = {
+ -- 打开关闭文本时通知
+ openClose = true,
+ -- 文本改变时完全通知 TODO 支持差量更新(2)
+ change = 1,
+ }
+ }
+ }
+end