- if require("lazyvim.util").has("trouble.nvim") then
- opts.consumers = opts.consumers or {}
- -- Refresh and auto close trouble after running tests
- ---@type neotest.Consumer
- opts.consumers.trouble = function(client)
- client.listeners.results = function(adapter_id, results, partial)
- if partial then
- return
- end
- local tree = assert(client:get_position(nil, { adapter = adapter_id }))
+ opts.consumers = opts.consumers or {}
+ -- Refresh and auto close trouble after running tests
+ ---@type neotest.Consumer
+ opts.consumers.trouble = function(client)
+ client.listeners.results = function(adapter_id, results, partial)
+ if partial then
+ return
+ end
+ local tree = assert(client:get_position(nil, { adapter = adapter_id }))