doctorfree / nvim-lazyman

Neovim configuration manager and Lazy/Lua/Mason based Neovim config. Manage multiple Neovim configurations with the lazyman command. ☕
https://lazyman.dev
MIT License
263 stars 8 forks source link

Unable to install on CentOS-7 #67

Closed wxguy closed 4 months ago

wxguy commented 4 months ago

Today, I tried to install lazyman on my CentOS-7 machine. Post installation of lazyman, if I open lman, I get following error:-

Error detected while processing /home/sundar/.config/nvim-Lazyman/init.lua:
E5113: Error while calling lua chunk: ...e/sundar/.config/nvim-Lazyman/lua/ecovim/config/lazy.lua:16: module 'l
azy' not found:
        no field package.preload['lazy']
        no file './lazy.lua'
        no file '/__w/neovim/neovim/.deps/usr/share/luajit-2.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy/init.lua'
        no file '/__w/neovim/neovim/.deps/usr/share/lua/5.1/lazy.lua'
        no file '/__w/neovim/neovim/.deps/usr/share/lua/5.1/lazy/init.lua'
        no file './lazy.so'
        no file '/usr/local/lib/lua/5.1/lazy.so'
        no file '/__w/neovim/neovim/.deps/usr/lib/lua/5.1/lazy.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        ...e/sundar/.config/nvim-Lazyman/lua/ecovim/config/lazy.lua:16: in main chunk
        [C]: in function 'require'
        /home/sundar/.config/nvim-Lazyman/lua/ecovim/init.lua:7: in main chunk
        [C]: in function 'require'
        /home/sundar/.config/nvim-Lazyman/init.lua:45: in main chunk

From google, it is understood that lazy is not downloaded properly. However, I couldn't find the lazy directory itself. Any help to solve the issue.

wxguy commented 4 months ago

Just saw this message when I open the terminal (everytime):-

/home/sundar/.config/nvim-Lazyman/.lazymanrc:113: parse error near]]'`

Hopefully, it would be helpful to debug.

doctorfree commented 4 months ago

Hi, CentOS has given me so many headaches I stopped using it. However, Lazyman should function correctly on CentOS so let's poke around a bit. The lazy.nvim plugin manager should get downloaded into ~/.local/share/nvim-Lazyman/lazy/lazy.nvim. Can you check if that directory exists and is populated with files and folders (e.g. a lua folder)?

It looks initially like that did not get downloaded correctly. We're using vim.fn.system() to invoke git to clone the repository there. Perhaps git failed? If it is the case that the lazy.nvim folder does not exist in the data path above then the next thing I would suggest is to manually clone the lazy.nvim repository to test that git is working correctly. I can provide you with the command lazyman is using for that when I have time.

doctorfree commented 4 months ago

The command the Ecovim namespace of the Lazyman configuration runs to download lazy.nvim is:

git clone --filter=blob:none --single-branch https://github.com/folke/lazy.nvim.git ${HOME}/.local/share/nvim-Lazyman/lazy/lazy.nvim

Can you verify this works on your system? If so then my next guess would be Lua on CentOS but let's eliminate git first.

wxguy commented 4 months ago

Thank you for your response. The directory ~/.local/share/nvim-Lazyman/lazy/lazy.nvim is empty. When I issued the following command:-

git clone --filter=blob:none --single-branch https://github.com/folke/lazy.nvim.git ${HOME}/.local/share/nvim-Lazyman/lazy/lazy.nvim

I get the following error:-

error: unknown option `filter=blob:none'

I think this is the real issue. Probably the git version available in Cent OS-7 is very old. Here is the list of options as shown by git in which I am not able to find the option filter:-

usage: git clone [options] [--] <repo> [<dir>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --progress            force progress reporting
    -n, --no-checkout     don't create a checkout
    --bare                create a bare repository
    --mirror              create a mirror repository (implies bare)
    -l, --local           to clone from a local repository
    --no-hardlinks        don't use local hardlinks, always copy
    -s, --shared          setup as shared repository
    --recursive           initialize submodules in the clone
    --recurse-submodules  initialize submodules in the clone
    --template <template-directory>
                          directory from which templates will be used
    --reference <repo>    reference repository
    -o, --origin <name>   use <name> instead of 'origin' to track upstream
    -b, --branch <branch>
                          checkout <branch> instead of the remote's HEAD
    -u, --upload-pack <path>
                          path to git-upload-pack on the remote
    --depth <depth>       create a shallow clone of that depth
    --single-branch       clone only one branch, HEAD or --branch
    --separate-git-dir <gitdir>
                          separate git dir from working tree
    -c, --config <key=value>
                          set config inside the new repository

Maybe, we can use a different option with the same functionality to overcome this issue.

wxguy commented 4 months ago

Solved the issue by installing the latest git and lua from conda. It appears that this is the only way to overcome this issue as the lua version available in CentOS 7 is very old and gave me an error.

Since I was only working on the conda environment, I don't mind installing a few more packages from the repo.

You may update your documentation accordingly

doctorfree commented 4 months ago

Thanks! I will add a note about CentOS 7 along with the existing notes about macOS and bash.