Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install other plugins #46

Open
Wangch29 opened this issue Oct 21, 2024 · 4 comments
Open

Cannot install other plugins #46

Wangch29 opened this issue Oct 21, 2024 · 4 comments

Comments

@Wangch29
Copy link

Packer 报错:
Errors:
Cloning into '/Users/username/.local/share/nvim/site/pack/packer/start/tokyonight.nvim'...
remote: Not Found
fatal: repository 'https://github.com//Users/username/.config/nvim/lua/archvim/predownload/folke/tokyonight.nvim.git/' not found

✗ Failed to install /Users/username/.config/nvim/lua/archvim/predownload/lervag/vimtex

@Wangch29
Copy link
Author

我关了predownload 就可以下载别的了,init.vim 里 predownload = 0

但不知道有没有别的解决办法。

I solved it by set "predownload=0" in init.vim

@Wangch29 Wangch29 changed the title 怎么装不了别的plugin Cannot install other plugins Oct 22, 2024
@Sukanle
Copy link

Sukanle commented Dec 27, 2024

image
This bug is in the "lua/archvim/plugins.lua"file:523.
To fix this bug,please add "not" after "if", then swap the statements that return the value.

@archibate
Copy link
Owner

我知道原因了:vim.fn.isdirectory返回的是0或1。

而lua中0也会被视为true,导致无论是否存在该目录,都会进入return repo分支。

To fix this bug,please add "not" after "if", then swap the statements that return the value.

你的修复是错误的,那只会变成无论如何都进入return path分支。

正确的做法应该是:

if vim.fn.isdirectory(path) == 1 then

沙币 lua 🤣

@Sukanle
Copy link

Sukanle commented Dec 28, 2024

对的,我也对lua不熟悉,以为跟C++一样🤣🤣🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants