@@ -147,11 +147,6 @@ return require("telescope").register_extension {
147147 end ,
148148 },
149149 health = function ()
150- local health = vim .health or require " health"
151- local ok = health .ok or health .report_ok
152- local warn = health .warn or health .report_warn
153- local error = health .error or health .report_error
154-
155150 local good = true
156151 local eq = function (expected , actual )
157152 if tostring (expected ) ~= tostring (actual ) then
@@ -170,15 +165,15 @@ return require("telescope").register_extension {
170165 fzf .free_slab (slab )
171166
172167 if good then
173- ok " lib working as expected"
168+ vim . health . ok " lib working as expected"
174169 else
175- error " lib not working as expected, please reinstall and open an issue if this error persists"
170+ vim . health . error " lib not working as expected, please reinstall and open an issue if this error persists"
176171 return
177172 end
178173
179174 local has , config = pcall (require , " telescope.config" )
180175 if not has then
181- error " unexpected: telescope configuration couldn't be loaded"
176+ vim . health . error " unexpected: telescope configuration couldn't be loaded"
182177 end
183178
184179 local test_sorter = function (name , sorter )
@@ -191,9 +186,9 @@ return require("telescope").register_extension {
191186 sorter :_destroy ()
192187
193188 if good then
194- ok (name .. " correctly configured" )
189+ vim . health . ok (name .. " correctly configured" )
195190 else
196- warn (name .. " is not configured" )
191+ vim . health . warn (name .. " is not configured" )
197192 end
198193 end
199194 test_sorter (" file_sorter" , config .values .file_sorter {})
0 commit comments