summaryrefslogtreecommitdiff
path: root/server/src/capability
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-11-22 23:26:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-11-22 23:26:32 +0800
commitd0ff66c9abe9d6abbca12fd811e0c3cb69c1033a (patch)
treebb34518d70b85de7656dbdbe958dfa221a3ff3b3 /server/src/capability
parent0a2c2ad15e1ec359171fb0dd4c72e57c5b66e9ba (diff)
downloadlua-language-server-d0ff66c9abe9d6abbca12fd811e0c3cb69c1033a.zip
整理一下目录结构
Diffstat (limited to 'server/src/capability')
-rw-r--r--server/src/capability/completion.lua53
-rw-r--r--server/src/capability/init.lua3
2 files changed, 0 insertions, 56 deletions
diff --git a/server/src/capability/completion.lua b/server/src/capability/completion.lua
deleted file mode 100644
index 28a6036c..00000000
--- a/server/src/capability/completion.lua
+++ /dev/null
@@ -1,53 +0,0 @@
-local rpc = require 'rpc'
-
-local isEnable = false
-
-local function allWords()
- local str = [[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.:('"[,#*@| ]]
- local list = {}
- for c in str:gmatch '.' do
- list[#list+1] = c
- end
- return list
-end
-
-local function enable()
- if isEnable then
- return
- end
- isEnable = true
- log.debug('Enable completion.')
- rpc:request('client/registerCapability', {
- registrations = {
- {
- id = 'completion',
- method = 'textDocument/completion',
- registerOptions = {
- resolveProvider = false,
- triggerCharacters = allWords(),
- },
- },
- }
- })
-end
-
-local function disable()
- if not isEnable then
- return
- end
- isEnable = false
- log.debug('Disable completion.')
- rpc:request('client/unregisterCapability', {
- unregisterations = {
- {
- id = 'completion',
- method = 'textDocument/completion',
- },
- }
- })
-end
-
-return {
- enable = enable,
- disable = disable,
-}
diff --git a/server/src/capability/init.lua b/server/src/capability/init.lua
deleted file mode 100644
index 09eb6a09..00000000
--- a/server/src/capability/init.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-return {
- completion = require 'capability.completion',
-}