@@ -147,28 +147,6 @@ opts = {
147147 return true
148148 end ,
149149 vtsls = function (_ , opts )
150- if vim .lsp .config .denols and vim .lsp .config .vtsls then
151- --- @param server string
152- local resolve = function (server )
153- local markers , root_dir = vim .lsp .config [server ].root_markers , vim .lsp .config [server ].root_dir
154- vim .lsp .config (server , {
155- root_dir = function (bufnr , on_dir )
156- local is_deno = vim .fs .root (bufnr , { " deno.json" , " deno.jsonc" }) ~= nil
157- if is_deno == (server == " denols" ) then
158- if root_dir then
159- return root_dir (bufnr , on_dir )
160- elseif type (markers ) == " table" then
161- local root = vim .fs .root (bufnr , markers )
162- return root and on_dir (root )
163- end
164- end
165- end ,
166- })
167- end
168- resolve (" denols" )
169- resolve (" vtsls" )
170- end
171-
172150 Snacks .util .lsp .on ({ name = " vtsls" }, function (buffer , client )
173151 client .commands [" _typescript.moveToFileRefactoring" ] = function (command , ctx )
174152 --- @type string , string , lsp.Range
@@ -355,28 +333,6 @@ opts = {
355333 return true
356334 end ,
357335 vtsls = function (_ , opts )
358- if vim .lsp .config .denols and vim .lsp .config .vtsls then
359- --- @param server string
360- local resolve = function (server )
361- local markers , root_dir = vim .lsp .config [server ].root_markers , vim .lsp .config [server ].root_dir
362- vim .lsp .config (server , {
363- root_dir = function (bufnr , on_dir )
364- local is_deno = vim .fs .root (bufnr , { " deno.json" , " deno.jsonc" }) ~= nil
365- if is_deno == (server == " denols" ) then
366- if root_dir then
367- return root_dir (bufnr , on_dir )
368- elseif type (markers ) == " table" then
369- local root = vim .fs .root (bufnr , markers )
370- return root and on_dir (root )
371- end
372- end
373- end ,
374- })
375- end
376- resolve (" denols" )
377- resolve (" vtsls" )
378- end
379-
380336 Snacks .util .lsp .on ({ name = " vtsls" }, function (buffer , client )
381337 client .commands [" _typescript.moveToFileRefactoring" ] = function (command , ctx )
382338 --- @type string , string , lsp.Range
0 commit comments