File tree 1 file changed +7
-10
lines changed
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ local Util = require("lazy.util")
3
3
local Sections = require (" lazy.view.sections" )
4
4
local Handler = require (" lazy.core.handler" )
5
5
local Git = require (" lazy.manage.git" )
6
+ local Plugin = require (" lazy.core.plugin" )
6
7
7
8
local Text = require (" lazy.view.text" )
8
9
@@ -191,16 +192,12 @@ function M:reason(reason, opts)
191
192
--- @type string ?
192
193
local source = reason .source
193
194
if source then
194
- source = vim .loop .fs_realpath (source ) or source
195
- for _ , other in pairs (Config .plugins ) do
196
- if source :find (vim .loop .fs_realpath (other .dir ), 1 , true ) then
197
- reason .plugin = other .name
198
- reason .source = nil
199
- break
200
- end
201
- end
202
- if reason .source then
203
- local config = vim .loop .fs_realpath (vim .fn .stdpath (" config" ))
195
+ local plugin = Plugin .find (source )
196
+ if plugin then
197
+ reason .plugin = plugin .name
198
+ reason .source = nil
199
+ else
200
+ local config = vim .fn .stdpath (" config" )
204
201
if source == config .. " /init.lua" then
205
202
reason .source = " init.lua"
206
203
else
You can’t perform that action at this time.
0 commit comments