blob: a7e70d6631dab4100b69184cbdd97540e2e1bf37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
local rpc = require 'rpc'
local workspace = require 'workspace'
return function (lsp)
lsp.workspace = workspace()
-- 必须动态注册的事件:
rpc:request('client/registerCapability', {
registrations = {
-- 监事文件变化
{
id = '0',
method = 'workspace/didChangeWatchedFiles',
registerOptions = {
watchers = {
{
globPattern = '**/*.lua',
kind = 1 | 2 | 4, -- Create | Delete
},
},
},
},
}
}, function ()
log.debug('client/registerCapability Success!')
end)
return true
end
|