mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
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:
parent
1aa9e26e84
commit
1fe75188c3
1 changed files with 3 additions and 1 deletions
|
|
@ -79,7 +79,9 @@ function M.setup(opts)
|
||||||
error("Exiting")
|
error("Exiting")
|
||||||
end
|
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
|
-- autocmds and keymaps can wait to load
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
group = vim.api.nvim_create_augroup("LazyVim", { clear = true }),
|
group = vim.api.nvim_create_augroup("LazyVim", { clear = true }),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue