feat: Print warning when no providers found

This commit is contained in:
hedy
2023-11-08 22:24:45 +08:00
parent 451eca2b37
commit 09b51fa5d5
2 changed files with 9 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ function M.has_provider()
end
---@param on_symbols function
---@return boolean found_provider
function M.request_symbols(on_symbols, opts)
for _, value in ipairs(providers) do
local provider = require(value)
@@ -28,9 +29,10 @@ function M.request_symbols(on_symbols, opts)
_G._symbols_outline_current_provider = provider
_G._symbols_outline_current_provider.name = value
provider.request_symbols(on_symbols, opts)
break
return true
end
end
return false
end
return M