summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lsp.lua3
-rw-r--r--src/method/init.lua2
-rw-r--r--src/method/initialized.lua3
-rw-r--r--src/method/shutdown.lua3
4 files changed, 11 insertions, 0 deletions
diff --git a/src/lsp.lua b/src/lsp.lua
index eeb4e560..cb1b9a26 100644
--- a/src/lsp.lua
+++ b/src/lsp.lua
@@ -74,6 +74,9 @@ function mt:_readAsContent(header)
},
}
end
+ if not response then
+ log.error(err or ('没有回应:' .. method))
+ end
end
function mt:setInput(input)
diff --git a/src/method/init.lua b/src/method/init.lua
index 2674f7ae..214997d7 100644
--- a/src/method/init.lua
+++ b/src/method/init.lua
@@ -5,6 +5,8 @@ local function init(name)
end
init 'initialize'
+init 'initialized'
+init 'shutdown'
init 'textDocument/definition'
init 'textDocument/didOpen'
init 'textDocument/didChange'
diff --git a/src/method/initialized.lua b/src/method/initialized.lua
new file mode 100644
index 00000000..0451dc50
--- /dev/null
+++ b/src/method/initialized.lua
@@ -0,0 +1,3 @@
+return function (lsp)
+ return true
+end
diff --git a/src/method/shutdown.lua b/src/method/shutdown.lua
new file mode 100644
index 00000000..0451dc50
--- /dev/null
+++ b/src/method/shutdown.lua
@@ -0,0 +1,3 @@
+return function (lsp)
+ return true
+end