make argc if statement more readable

I was just skimming the code until I saw the vim.fn.argc snippet, I didn't know what was going on at first and did a quick google search
just declared a variable so that the reader knows whats going on
This commit is contained in:
syIvii 2023-01-31 11:26:45 -08:00 committed by GitHub
parent 1aa9e26e84
commit 1fe75188c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,7 +79,9 @@ function M.setup(opts)
error("Exiting")
end
if vim.fn.argc(-1) == 0 then
--
local file_argument = vim.fn.argc(-1) == 0
if file_argument then
-- autocmds and keymaps can wait to load
vim.api.nvim_create_autocmd("User", {
group = vim.api.nvim_create_augroup("LazyVim", { clear = true }),