Closed sanevillain closed 11 months ago
could you provide a minimal repro? because the minimal repro uses the exact same code snippet and people don't get issues there so I think it's a problem with your setup
..smail/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:75:
Lazy's init.lua is found. Could you check if there is a stats.lua in that same folder? If that file is not present, your installation is not correct. Perhaps the git clone failed.
You could try to start from scratch , removing everything from these locations inside your home folder:
@max397574 Updated the minimal setup. @abeldekat The file stats.lua
is present on my system. I cleand both the .cache
and state
folder and most of the share
folder, but since I've got some mason files in share
folder used by my lunarvim config I didn't touch them. It's still failing with the same message.
Output of :checkhealth
lazy: require("lazy.health").check()
- ERROR Failed to run healthcheck for "lazy" plugin. Exception:
...ail/.local/share/nvim/lazy/lazy.nvim/lua/lazy/health.lua:1: module 'lazy.core.config' not found:
no field package.preload['lazy.core.config']module 'LJK@/Users/denismail/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/config.lua~' not found:
no field package.preload['LJK@/Users/denismail/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/config.lua~']
cache_loader: module LJK@/Users/denismail/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/config.lua~ not found
cache_loader_lib: module LJK@/Users/denismail/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/config.lua~ not found
no file './LJK@/Users/denismail//local/share/nvim/lazy/lazy/nvim/lua/lazy/core/config/lua~.lua'
no file '/Users/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/LJK@/Users/denismail//local/share/nvim/lazy/lazy/nvim/lua/lazy/core/config/lua~.lua'
no file '/usr/local/share/lua/5.1/LJK@/Users/denismail//local/share/nvim/lazy/lazy/nvim/lua/lazy/core/config/lua~.lua'
no file '/usr/local/share/lua/5.1/LJK@/Users/denismail//local/share/nvim/lazy/lazy/nvim/lua/lazy/core/config/lua~/init.lua'
no file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/LJK@/Users/denismail//local/share/nvim/lazy/lazy/nvim/lua/lazy/core/config/lua~.lua'
no file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/LJK@/Users/denismail//local/share/nvim/lazy/lazy/nvim/lua/lazy/core/config/lua~/init.lua'
no file './LJK@/Users/denismail//local/share/nvim/lazy/lazy/nvim/lua/lazy/core/config/lua~.so'
no file '/usr/local/lib/lua/5.1/LJK@/Users/denismail//local/share/nvim/lazy/lazy/nvim/lua/lazy/core/config/lua~.so'
no file '/Users/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/LJK@/Users/denismail//local/share/nvim/lazy/lazy/nvim/lua/lazy/core/config/lua~.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './LJK@/Users/denismail/.so'
no file '/usr/local/lib/lua/5.1/LJK@/Users/denismail/.so'
no file '/Users/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/LJK@/Users/denismail/.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
cache_loader_lib: module lazy.core.config not found
no file './lazy/core/config.lua'
no file '/Users/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/lazy/core/config.lua'
no file '/usr/local/share/lua/5.1/lazy/core/config.lua'
no file '/usr/local/share/lua/5.1/lazy/core/config/init.lua'
no file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy/core/config.lua'
no file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy/core/config/init.lua'
no file './lazy/core/config.so'
no file '/usr/local/lib/lua/5.1/lazy/core/config.so'
no file '/Users/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/lazy/core/config.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './lazy.so'
no file '/usr/local/lib/lua/5.1/lazy.so'
no file '/Users/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/lazy.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
Pwd of lazy /Users/denismail/.local/share/nvim/lazy
Contents of lazy folder
.
āāā lazy.nvim
āāā CHANGELOG.md
āāā LICENSE
āāā README.md
āāā TODO.md
āāā doc
āĀ Ā āāā lazy.nvim.txt
āĀ Ā āāā tags
āāā lua
āĀ Ā āāā lazy
āĀ Ā āāā core
āĀ Ā āāā docs.lua
āĀ Ā āāā example.lua
āĀ Ā āāā health.lua
āĀ Ā āāā help.lua
āĀ Ā āāā init.lua
āĀ Ā āāā manage
āĀ Ā āāā state.lua
āĀ Ā āāā stats.lua
āĀ Ā āāā status.lua
āĀ Ā āāā types.lua
āĀ Ā āāā util.lua
āĀ Ā āāā view
āāā selene.toml
āāā stylua.toml
āāā tests
āĀ Ā āāā core
āĀ Ā āĀ Ā āāā e2e_spec.lua
āĀ Ā āĀ Ā āāā init_spec.lua
āĀ Ā āĀ Ā āāā plugin_spec.lua
āĀ Ā āĀ Ā āāā util_spec.lua
āĀ Ā āāā handlers
āĀ Ā āĀ Ā āāā keys_spec.lua
āĀ Ā āāā helpers.lua
āĀ Ā āāā init.lua
āĀ Ā āāā manage
āĀ Ā āĀ Ā āāā runner_spec.lua
āĀ Ā āĀ Ā āāā semver_spec.lua
āĀ Ā āĀ Ā āāā task_spec.lua
āĀ Ā āāā run
āāā vim.toml
Is it somehow interfering with the other lazy
installation that I have under /Users/denismail/.local/share/lunarvim/site/pack/lazy/opt/lazy.nvim
?
Just delete ~/.local/share/nvim/lazy/lazy.nvim
folder, since that's the folder responsible for lazy.nvim
itself and let Neovim re-install it after you restart.
@dpetka2001 I've done that multiple times, but to no avail, unfortunately. It's the same every time.
How do you start Neovim since you seem to have both a custom Neovim configuration and a Lunarvim configuration?
@dpetka2001 Lunarvim has an lvim
command which starts nvim with the lunarvim environment and configuration and it uses that as its runtime path.
lvim() {
nvim -u "$LUNARVIM_BASE_DIR/tests/minimal_init.lua" --cmd "set runtimepath+=$LUNARVIM_BASE_DIR" "$@"
}
Idk if lunarvim uses packer or lazy.nvim but no matter what if it uses lazy.nvim you likely can't also install it yourself if it uses packer.nvim there is a chance that those two are conflicting
@max397574 It does use lazy. I suppose that there's some collision going on in there even if they both use different runtimepaths.
If Lunarvim uses a seperate directory under ~/.local/share
to store its environment I don't see why there can't be different installations of lazy.nvim
. That's also what happens when I test different configs with NVIM_APP_NAME
. Each configuration goes to its own directory and has its own lazy.nvim
installation and configuration. What should be clarified in regards to Lunarvim, is the location it uses to save the lazy.nvim
repo.
@dpetka2001 I've shared it above. The installation location that is uses is the following $HOME/.local/share/lunarvim/site/pack/lazy/opt/lazy.nvim
Open Lunarvim and issue the following command :echo stdpath("data")
. What is the output? Open your custom configuration Neovim and run the same command. Are the 2 outputs the same?
@dpetka2001 Yes, they are the same.
@dpetka2001 Internally it uses the custom runtimepath, but there are a couple of occasions in which it uses the default stdpath
.
They shouldn't be the same. I have 2 configurations and they have different data paths. One is ~/.local/share/nvim
(my default configuration) and the other one is ~/.local/share/lazyTest
(my configuration for testing purposes). I don't know what you did and ended up with this situation, but my suggestion would be to start afresh, since this is definitely a Neovim misconfiguration from 2 different configs.
Could you try the following:
cd ~/.config
git clone https://github.com/lazyvim/starter.git lazytest
cd lazytest
NVIM_APPNAME=lazytest nvim init.lua
Reboot after installation. If the problem is LunarVim related, this should succeed:
NVIM_APPNAME=lazytest nvim init.lua
Edit:
What is the output of the following command:
alias | grep "nvim"
@abeldekat The test succeeded. The following command doesn't return anything. I guess that confirms it. My initial intuition told me that it might have something to do with my lunarvim setup. Any recommendations for creating a separate nvim
environment ?
You have just done so....)
I would advise to completely uninstall LunarVim
Then, confirm that nvim
works as expected.
Than, install LunarVim once more.
If this breaks the nvim
command, create an issue in their github repro.
The test succeeds, because NVIM_APP_NAME
makes sure to distinguish between different XDG_DATA_HOME
directories from different configurations. The problem still remains, that your own custom configuration and Lunarvim are borked. You should start afresh.
Agreeing with @dpetka2001.
LunarVim and your custom nvim should be able to coexist.
But still, could this be a LunarVim issue?
@abeldekat I also don't know. The project hasn't been maintained much in awhile now, so it might be time to try out lazy.
No idea, never used it. echo stdpath("data")
should not dabble with default XDG_DATA_HOME
directory if they indeed use their own environment to store stuff. There may be some kind of misconfiguration on their part, but I can't say for sure since I've never used it.
@dpetka2001 The thing is that by looking at the source code I can see that they don't always use the "dedicated" path for lunarvim, but occasionally also the stdpath which might be the cause of the weird errors, since the majority of the codebase was written before the introduction of the path NVIM_APPNAME
variable
I don't know what to tell you. I can only advocate in favor of LazyVim, since that's the distro I'm using and I think I got really lucky when deciding what to choose, because it's super simple and I've read quite a few things about other distros making things unnecessarily complicated on reddit. But I cannot talk about other distros since I've not tried them. Anyway whichever way you decide to go, I'd suggest reading more about NVIM_APP_NAME
and how you can make use of it, since it allows you to have multiple configurations and they're all distinct from each other. That way you can make your own custom and test other distros as well without so much trouble. I believe this can be closed, since it's not really lazy.nvim
related?
@sanevillain why are you trying to install lazy.nvim anyway? you should just install plugins like explained here https://www.lunarvim.org/docs/configuration/plugins/user-plugins
This doesn't have to do with installing plugins. This has to do with him deciding to also make his own custom config along with Lunarvim. And in his own config he wanted to install lazy.nvim
. They should be 2 different configurations with different XDG_DATA_HOME
directories, so there isn't any conflict between them. That was the problem.
well but that's not what you should do just make a "lunarvim" config and install plugins like this
if it would work then go for it if you want that but if it doesn't then this isn't a lazy.nvim issue nor a lunarvim issue because that's just not how it's intended to be used
@max397574 I just wanted to have another nvim environment that I can use.
wym another environment? just use neovim with different configs which you can do with the nvim-appname thing and lunarvim separately
I will try to create a separate environment with the NVIM_APP_NAME
method.
Please be aware that I misspoke earlier. The correct term is NVIM_APPNAME
like @abeldekat used in the example above that you also tested. Just wanted to make sure you don't try something that is wrong.
Thank you guys for your help. I will try to remove my current lunarvim installation locally and see if I'll be able to do it afterwards.
Plz be kind and also close this issue, since it's not lazy.nvim
related after all.
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0-dev-64b53b7
Operating system/version
MacOS Venture 13.6
Describe the bug
Installing the plugin with the steps described in the read me
is failing with the following messages
This has been tested with the latest nightly version of neovim, along with the latest stable version and the outcome was always the same.
I want to note that I also use lunarvim and thought that somehow the runtime of lunarvim was interfering here, but it shouldn't be the case as all of the lazy plugins are stored in a completely separate location.
Steps To Reproduce
Expected Behavior
I expect the
setup
function to be able to load otherlazy
modules that it relies on and doesn't crashRepro