summaryrefslogtreecommitdiff
path: root/script/provider/capability.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-01 19:11:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-01 19:11:45 +0800
commitb02b3fe1dc20a560146548bbf766e3b49076df66 (patch)
treed7d1a071be73b4ddaffc7b8ce7f51f1fedc6f354 /script/provider/capability.lua
parent75ccd8ae4272c2b193df3993f7d4e6819ff66ac7 (diff)
downloadlua-language-server-b02b3fe1dc20a560146548bbf766e3b49076df66.zip
try file operations event
Diffstat (limited to 'script/provider/capability.lua')
-rw-r--r--script/provider/capability.lua44
1 files changed, 41 insertions, 3 deletions
diff --git a/script/provider/capability.lua b/script/provider/capability.lua
index 9a8d4f9b..856f2b39 100644
--- a/script/provider/capability.lua
+++ b/script/provider/capability.lua
@@ -1,6 +1,7 @@
-local sp = require 'bee.subprocess'
-local nonil = require 'without-check-nil'
-local client = require 'provider.client'
+local sp = require 'bee.subprocess'
+local nonil = require 'without-check-nil'
+local client = require 'provider.client'
+local platform = require 'bee.platform'
local m = {}
@@ -51,6 +52,43 @@ function m.getIniter()
},
},
foldingRangeProvider = true,
+ workspace = {
+ fileOperations = {
+ didCreate = {
+ filters = {
+ {
+ pattern = {
+ glob = '**/*.lua',
+ matches = 'file',
+ options = platform.OS == 'Windows',
+ }
+ }
+ }
+ },
+ didDelete = {
+ filters = {
+ {
+ pattern = {
+ glob = '**/*.lua',
+ matches = 'file',
+ options = platform.OS == 'Windows',
+ }
+ }
+ }
+ },
+ didRename = {
+ filters = {
+ {
+ pattern = {
+ glob = '**/*.lua',
+ matches = 'file',
+ options = platform.OS == 'Windows',
+ }
+ }
+ }
+ },
+ },
+ }
--documentOnTypeFormattingProvider = {
-- firstTriggerCharacter = '}',
--},