summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-16 22:57:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-16 22:57:59 +0800
commitd31ecd5f2b8793667b3e8dad576737440c47a29d (patch)
tree4a81018e82564fb036685b995f25e185d90de352 /script/provider/provider.lua
parente8fb2d2e0af8776662e010d334eb46ca1ccd7729 (diff)
downloadlua-language-server-d31ecd5f2b8793667b3e8dad576737440c47a29d.zip
cleanup
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua61
1 files changed, 0 insertions, 61 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 24ca003b..b8b101ed 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -986,17 +986,6 @@ m.register 'window/workDoneProgress/cancel' {
end
}
-m.register '$/didChangeVisibleRanges' {
- ---@async
- function (params)
- local uri = files.getRealUri(params.uri)
- await.close('visible:' .. uri)
- await.setID('visible:' .. uri)
- await.delay()
- files.setVisibles(uri, params.ranges)
- end
-}
-
m.register '$/status/click' {
---@async
function ()
@@ -1212,56 +1201,6 @@ m.register 'inlayHint/resolve' {
end
}
--- Hint
-do
- ---@async
- local function updateHint(uri)
- if not config.get(uri, 'Lua.hint.enable') then
- return
- end
- local id = 'updateHint' .. uri
- await.close(id)
- await.setID(id)
- workspace.awaitReady(uri)
- local visibles = files.getVisibles(uri)
- if not visibles then
- return
- end
- await.close(id)
- await.setID(id)
- await.delay()
- workspace.awaitReady(uri)
- local edits = {}
- local hint = require 'core.hint'
- local _ <close> = progress.create(uri, lang.script.WINDOW_PROCESSING_HINT, 0.5)
- for _, visible in ipairs(visibles) do
- local piece = hint(uri, visible.start, visible.finish)
- if piece then
- for _, edit in ipairs(piece) do
- edits[#edits+1] = {
- text = edit.text,
- pos = converter.packPosition(uri, edit.offset),
- }
- end
- end
- end
-
- proto.notify('$/hint', {
- uri = uri,
- edits = edits,
- })
- end
-
- files.watch(function (ev, uri)
- if ev == 'update'
- or ev == 'updateVisible' then
- await.call(function () ---@async
- updateHint(uri)
- end)
- end
- end)
-end
-
local function refreshStatusBar()
local valid = config.get(nil, 'Lua.window.statusBar')
for _, scp in ipairs(workspace.folders) do