mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat: added support for Windows
This commit is contained in:
parent
198963fdab
commit
bb1c2f4c3e
3 changed files with 12 additions and 5 deletions
|
@ -220,12 +220,13 @@ function M:reason(reason, opts)
|
|||
---@type string?
|
||||
local source = reason.source
|
||||
if source then
|
||||
source = Util.norm(source)
|
||||
local plugin = Plugin.find(source)
|
||||
if plugin then
|
||||
reason.plugin = plugin.name
|
||||
reason.source = nil
|
||||
else
|
||||
local config = vim.fn.stdpath("config")
|
||||
local config = Util.norm(vim.fn.stdpath("config"))
|
||||
if source == config .. "/init.lua" then
|
||||
reason.source = "init.lua"
|
||||
else
|
||||
|
@ -237,6 +238,7 @@ function M:reason(reason, opts)
|
|||
end
|
||||
end
|
||||
if reason.runtime then
|
||||
reason.runtime = Util.norm(reason.runtime)
|
||||
reason.runtime = reason.runtime:gsub(".*/([^/]+/plugin/.*)", "%1")
|
||||
reason.runtime = reason.runtime:gsub(".*/([^/]+/after/.*)", "%1")
|
||||
reason.runtime = reason.runtime:gsub(".*/([^/]+/ftdetect/.*)", "%1")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue