diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-01 19:11:45 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-01 19:11:45 +0800 |
commit | b02b3fe1dc20a560146548bbf766e3b49076df66 (patch) | |
tree | d7d1a071be73b4ddaffc7b8ce7f51f1fedc6f354 /script/provider/capability.lua | |
parent | 75ccd8ae4272c2b193df3993f7d4e6819ff66ac7 (diff) | |
download | lua-language-server-b02b3fe1dc20a560146548bbf766e3b49076df66.zip |
try file operations event
Diffstat (limited to 'script/provider/capability.lua')
-rw-r--r-- | script/provider/capability.lua | 44 |
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 = '}', --}, |