@@ -986,17 +986,6 @@ m.register 'window/workDoneProgress/cancel' {
986986 end
987987}
988988
989- m .register ' $/didChangeVisibleRanges' {
990- --- @async
991- function (params )
992- local uri = files .getRealUri (params .uri )
993- await .close (' visible:' .. uri )
994- await .setID (' visible:' .. uri )
995- await .delay ()
996- files .setVisibles (uri , params .ranges )
997- end
998- }
999-
1000989m .register ' $/status/click' {
1001990 --- @async
1002991 function ()
@@ -1212,56 +1201,6 @@ m.register 'inlayHint/resolve' {
12121201 end
12131202}
12141203
1215- -- Hint
1216- do
1217- --- @async
1218- local function updateHint (uri )
1219- if not config .get (uri , ' Lua.hint.enable' ) then
1220- return
1221- end
1222- local id = ' updateHint' .. uri
1223- await .close (id )
1224- await .setID (id )
1225- workspace .awaitReady (uri )
1226- local visibles = files .getVisibles (uri )
1227- if not visibles then
1228- return
1229- end
1230- await .close (id )
1231- await .setID (id )
1232- await .delay ()
1233- workspace .awaitReady (uri )
1234- local edits = {}
1235- local hint = require ' core.hint'
1236- local _ <close> = progress .create (uri , lang .script .WINDOW_PROCESSING_HINT , 0.5 )
1237- for _ , visible in ipairs (visibles ) do
1238- local piece = hint (uri , visible .start , visible .finish )
1239- if piece then
1240- for _ , edit in ipairs (piece ) do
1241- edits [# edits + 1 ] = {
1242- text = edit .text ,
1243- pos = converter .packPosition (uri , edit .offset ),
1244- }
1245- end
1246- end
1247- end
1248-
1249- proto .notify (' $/hint' , {
1250- uri = uri ,
1251- edits = edits ,
1252- })
1253- end
1254-
1255- files .watch (function (ev , uri )
1256- if ev == ' update'
1257- or ev == ' updateVisible' then
1258- await .call (function () --- @async
1259- updateHint (uri )
1260- end )
1261- end
1262- end )
1263- end
1264-
12651204local function refreshStatusBar ()
12661205 local valid = config .get (nil , ' Lua.window.statusBar' )
12671206 for _ , scp in ipairs (workspace .folders ) do
0 commit comments