summaryrefslogtreecommitdiff
path: root/script/provider/capability.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-02 16:44:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-02 16:44:28 +0800
commitcd5b93f0308ca9e3f494344a626730efdc10f219 (patch)
tree45eff587f41d4c73a9d28bda8d4fd20a464392a0 /script/provider/capability.lua
parent0948c854de21e720c951c51c37d40b0ef8af980b (diff)
downloadlua-language-server-cd5b93f0308ca9e3f494344a626730efdc10f219.zip
File event is not perfect, do not use it first
Diffstat (limited to 'script/provider/capability.lua')
-rw-r--r--script/provider/capability.lua78
1 files changed, 41 insertions, 37 deletions
diff --git a/script/provider/capability.lua b/script/provider/capability.lua
index 6bf93f95..e7219c93 100644
--- a/script/provider/capability.lua
+++ b/script/provider/capability.lua
@@ -14,6 +14,44 @@ local function allWords()
return list
end
+local function testFileEvents(initer)
+ initer.fileOperations = {
+ didCreate = {
+ filters = {
+ {
+ pattern = {
+ glob = '**',
+ --matches = 'file',
+ options = platform.OS == 'Windows',
+ }
+ }
+ }
+ },
+ didDelete = {
+ filters = {
+ {
+ pattern = {
+ glob = '**',
+ --matches = 'file',
+ options = platform.OS == 'Windows',
+ }
+ }
+ }
+ },
+ didRename = {
+ filters = {
+ {
+ pattern = {
+ glob = '**',
+ --matches = 'file',
+ options = platform.OS == 'Windows',
+ }
+ }
+ }
+ },
+ }
+end
+
function m.getIniter()
local initer = {
-- 文本同步方式
@@ -52,48 +90,14 @@ function m.getIniter()
},
},
foldingRangeProvider = true,
- workspace = {
- fileOperations = {
- didCreate = {
- filters = {
- {
- pattern = {
- glob = '**',
- --matches = 'file',
- options = platform.OS == 'Windows',
- }
- }
- }
- },
- didDelete = {
- filters = {
- {
- pattern = {
- glob = '**',
- --matches = 'file',
- options = platform.OS == 'Windows',
- }
- }
- }
- },
- didRename = {
- filters = {
- {
- pattern = {
- glob = '**',
- --matches = 'file',
- options = platform.OS == 'Windows',
- }
- }
- }
- },
- },
- }
+ workspace = {}
--documentOnTypeFormattingProvider = {
-- firstTriggerCharacter = '}',
--},
}
+ --testFileEvents()
+
nonil.enable()
if not client.info.capabilities.textDocument.completion.dynamicRegistration then
initer.completionProvider = {