Skip to content

Instantly share code, notes, and snippets.

@eduardoarandah
Created August 25, 2022 19:37
Show Gist options
  • Save eduardoarandah/4a926432937135ed6c8ca6a4df16ef57 to your computer and use it in GitHub Desktop.
Save eduardoarandah/4a926432937135ed6c8ca6a4df16ef57 to your computer and use it in GitHub Desktop.
#tip don’t run some files in your config if requirements are needed.
-- Check requirements
local all_requirements = 1
for _, requirement in ipairs({ "git", "rg", "node", "npm" }) do
if vim.fn.executable(requirement) == 0 then
print("plugins require " .. requirement)
all_requirements = 0
end
end
if all_requirements == 0 then
print("can't install plugins")
return
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment