Skip to content

Commit

Permalink
feat(health): check for paths on the rtp from plugged or packer
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Feb 27, 2023
1 parent b814d87 commit 9bd1c94
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/lazy/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ function M.check()
vim.health.report_ok("no existing packages found by other package managers")
end

for _, name in ipairs({ "packer", "plugged", "paq" }) do
for _, path in ipairs(vim.opt.rtp:get()) do
if path:find(name, 1, true) then
vim.health.report_error("Found paths on the rtp from another plugin manager `" .. name .. "`")
break
end
end
end

local packer_compiled = vim.fn.stdpath("config") .. "/plugin/packer_compiled.lua"
if vim.loop.fs_stat(packer_compiled) then
vim.health.report_error("please remove the file `" .. packer_compiled .. "`")
Expand Down

0 comments on commit 9bd1c94

Please sign in to comment.