diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-01-30 02:39:01 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-01-30 02:39:01 +0800 |
commit | 3a21b34bb31c8988bff6b636bdbf506db373d564 (patch) | |
tree | a0d2a0b6b88387c5700405516d4b6146327b11e0 /script | |
parent | c7ad75d374ac8bbf39f43791d9fd90910ef5037a (diff) | |
download | lua-language-server-3a21b34bb31c8988bff6b636bdbf506db373d564.zip |
toy of decorations
Diffstat (limited to 'script')
-rw-r--r-- | script/provider/provider.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 9074b034..c9c0cb44 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -726,3 +726,25 @@ end) proto.on('window/workDoneProgress/cancel', function (params) progress.cancel(params.token) end) + +proto.on('didChangeVisibleRanges', function (params) + log.debug(util.dump(params)) + proto.notify('$/decorations/create', { + uri = params.uri, + edits = { + { + newText = ': 你猜猜我是啥类型', + range = { + start = { + line = params.ranges[1]['end'].line - 2, + character = params.ranges[1]['end'].character - 5, + }, + ['end'] = { + line = params.ranges[1]['end'].line - 2, + character = params.ranges[1]['end'].character - 5, + }, + }, + } + } + }) +end) |