summaryrefslogtreecommitdiff
path: root/server/src/method
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/method')
-rw-r--r--server/src/method/initialize.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/server/src/method/initialize.lua b/server/src/method/initialize.lua
index 4bc3ff2e..3de9a89e 100644
--- a/server/src/method/initialize.lua
+++ b/server/src/method/initialize.lua
@@ -1,3 +1,12 @@
+local function allWords()
+ local str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
+ local list = {}
+ for c in str:gmatch '.' do
+ list[#list+1] = c
+ end
+ return table.unpack(list)
+end
+
return function (lsp)
lsp._inited = true
return {
@@ -26,7 +35,7 @@ return function (lsp)
-- 自动完成
completionProvider = {
resolveProvider = false,
- triggerCharacters = { '.', ':' },
+ triggerCharacters = { '.', ':', allWords() },
},
-- 工作目录
workspace = {